Created
February 3, 2022 07:08
-
-
Save ProgrammingFire/c8beb43d579d202b9586b29e0edf3430 to your computer and use it in GitHub Desktop.
Sample Node.JS Docker file
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 # Replace With Your Node.JS Version | |
WORKDIR /app | |
COPY package*.json ./ | |
RUN npm ci --only=production # Similiar To npm install | |
COPY . ./ | |
ENV PORT 8000 | |
EXPOSE ${PORT} | |
RUN npm run build | |
CMD ["npm", "run", "start"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment