Skip to content

Instantly share code, notes, and snippets.

@abbasogaji
Created December 15, 2019 23:01
Show Gist options
  • Save abbasogaji/f8f084e3678d6e73ca0bf882e078446c to your computer and use it in GitHub Desktop.
Save abbasogaji/f8f084e3678d6e73ca0bf882e078446c to your computer and use it in GitHub Desktop.
Dockerfile for NestJs Production deployment
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