24 lines
446 B
Docker
Raw Normal View History

2023-12-21 17:07:35 +01:00
FROM node:18-bullseye-slim as base
2023-02-09 17:21:25 +01:00
RUN apt-get update && apt-get install -y make g++ python3
RUN ln -sf /usr/bin/python3 /usr/bin/python
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
2023-12-21 17:07:35 +01:00
FROM base as production
COPY package*.json ./
USER node
2022-04-09 08:58:22 +02:00
RUN npm ci
COPY --chown=node:node . ./
RUN npm run build
EXPOSE 8080
ENTRYPOINT ["npm", "run", "start:prod"]
2023-12-21 17:07:35 +01:00
FROM base as development
USER node