2021-09-08 12:20:19 +02:00
|
|
|
FROM node:16-alpine
|
|
|
|
|
2022-04-09 08:58:22 +02:00
|
|
|
RUN mkdir -p /home/node/app/node_modules && chown -R node:node /home/node/app
|
|
|
|
WORKDIR /home/node/app
|
2021-09-08 12:20:19 +02:00
|
|
|
|
|
|
|
COPY package*.json ./
|
|
|
|
|
|
|
|
USER node
|
2022-04-09 08:58:22 +02:00
|
|
|
RUN npm ci
|
|
|
|
|
|
|
|
COPY --chown=node:node . ./
|
|
|
|
RUN npm run build
|
2021-09-08 12:20:19 +02:00
|
|
|
|
|
|
|
EXPOSE 8080
|
|
|
|
|
|
|
|
ENTRYPOINT ["npm", "run", "start:prod"]
|