rimgu/Dockerfile

20 lines
294 B
Docker
Raw Normal View History

2021-10-06 15:24:55 +00:00
FROM node:16-slim as builder
2021-10-06 17:47:31 +00:00
RUN mkdir /app
COPY package.json /app/
COPY package-lock.json /app/
2021-10-06 15:24:55 +00:00
WORKDIR /app
2021-10-06 17:47:31 +00:00
RUN npm ci
COPY . /app
RUN npm run build
2021-10-06 15:24:55 +00:00
FROM node:16-slim
COPY --from=builder /app/dist/ /app/
WORKDIR /app
RUN npm install --production
CMD ["/usr/local/bin/node", "index.js"]