Public-Dockerfiles/whitebophir_application_dockerfile

24 lines
467 B
Text
Raw Normal View History

2024-11-23 18:59:34 +01:00
ARG NODE_IMAGE_VERSION=23-alpine
FROM node:${NODE_IMAGE_VERSION}
ARG VERSION
WORKDIR /opt/app
RUN chown -R node:node /opt/app
# Allow node to bind to port 80
RUN apk update && apk add libcap
USER node
2024-11-23 19:11:30 +01:00
RUN wget https://github.com/lovasoa/whitebophir/archive/refs/tags/v${VERSION}.tar.gz -O artifact.tar.gz \
&& tar --strip-components=1 -xvzf artifact.tar.gz \
&& rm artifact.tar.gz
2024-11-23 18:59:34 +01:00
RUN npm ci --production
EXPOSE 3000
CMD ["node", "server/server.js"]