Created
November 17, 2021 11:04
-
-
Save ProgrammingFire/cb654d59c0e8f4b85a1316f1d26a01c1 to your computer and use it in GitHub Desktop.
NestJS Docker Image Example
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: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