Created
December 15, 2019 23:01
-
-
Save abbasogaji/f8f084e3678d6e73ca0bf882e078446c to your computer and use it in GitHub Desktop.
Dockerfile for NestJs Production deployment
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node:10 AS builder | |
WORKDIR /app | |
COPY ./package.json ./ | |
RUN npm install | |
COPY . . | |
RUN npm run build | |
FROM node:10 | |
WORKDIR /app | |
COPY --from=builder /app ./ | |
CMD ["npm", "run", "start:prod"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment