Last active
November 22, 2022 20:22
-
-
Save Maurifc/32613a7354d68faff4e28310ee4e269f to your computer and use it in GitHub Desktop.
Docker - Basic Dockerfile for NodeJS
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:16-alpine | |
RUN mkdir $HOME/app | |
WORKDIR $HOME/app | |
COPY --chown=node:node package.json $HOME/app/ | |
RUN npm install | |
COPY --chown=node:node . $HOME/app | |
EXPOSE 8080 | |
USER node | |
CMD npm start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment