whitebophir/Dockerfile

23 lines
406 B
Docker
Raw Permalink Normal View History

2024-10-11 22:05:47 +00:00
FROM node:22-alpine3.19
2018-11-26 15:29:11 +00:00
WORKDIR /opt/app
RUN chown -R 1000:1000 /opt/app
# Allow node to bind to port 80
RUN apk update && apk add libcap
RUN setcap CAP_NET_BIND_SERVICE=+eip /usr/local/bin/node
USER 1000:1000
COPY package.json package-lock.json ./
RUN npm ci --production
COPY --chown=1000:1000 . .
2021-06-09 15:35:50 +00:00
ENV PORT=80
EXPOSE 80
VOLUME /opt/app/server-data
2018-11-26 15:29:11 +00:00
CMD ["/usr/local/bin/node", "server/server.js"]