Skip to content

Instantly share code, notes, and snippets.

@ProgrammingFire
Created November 17, 2021 11:04
Show Gist options
  • Save ProgrammingFire/cb654d59c0e8f4b85a1316f1d26a01c1 to your computer and use it in GitHub Desktop.
Save ProgrammingFire/cb654d59c0e8f4b85a1316f1d26a01c1 to your computer and use it in GitHub Desktop.
NestJS Docker Image Example
FROM node:latest
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production
COPY . ./
ENV NODE_ENV production
ENV PORT 8000
EXPOSE ${PORT}
RUN npm run test
RUN npm run build
CMD ["npm", "run", "start:prod"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment