2024-10-11 22:05:47 +00:00
|
|
|
FROM node:22-alpine3.19
|
2018-11-26 15:29:11 +00:00
|
|
|
|
2020-04-12 07:15:56 +00:00
|
|
|
WORKDIR /opt/app
|
2021-01-10 16:02:23 +00:00
|
|
|
|
|
|
|
RUN chown -R 1000:1000 /opt/app
|
|
|
|
|
2021-06-11 23:16:02 +00:00
|
|
|
# Allow node to bind to port 80
|
|
|
|
RUN apk update && apk add libcap
|
|
|
|
RUN setcap CAP_NET_BIND_SERVICE=+eip /usr/local/bin/node
|
|
|
|
|
2021-01-10 16:02:23 +00:00
|
|
|
USER 1000:1000
|
|
|
|
|
2020-10-30 21:52:38 +00:00
|
|
|
COPY package.json package-lock.json ./
|
|
|
|
RUN npm ci --production
|
2021-05-05 22:12:14 +00:00
|
|
|
COPY --chown=1000:1000 . .
|
2019-03-27 10:50:24 +00:00
|
|
|
|
2021-06-09 15:35:50 +00:00
|
|
|
ENV PORT=80
|
|
|
|
EXPOSE 80
|
2019-03-27 10:50:24 +00:00
|
|
|
|
2019-01-11 03:55:24 +00:00
|
|
|
VOLUME /opt/app/server-data
|
2018-11-26 15:29:11 +00:00
|
|
|
|
2021-06-11 23:16:02 +00:00
|
|
|
CMD ["/usr/local/bin/node", "server/server.js"]
|