Created
July 14, 2020 04:38
-
-
Save caeb92/a5274e43c60080e72de724ba681c02c4 to your computer and use it in GitHub Desktop.
Dockerfile nodejs
This file contains hidden or 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:12-alpine | |
RUN mkdir /home/node/app/ && chown -R node:node /home/node/app | |
WORKDIR /home/node/app | |
COPY --chown=node:node package*.json ./ | |
USER node | |
RUN npm install --loglevel=error | |
COPY --chown=node:node server.js . | |
COPY --chown=node:node lib ./lib/ | |
EXPOSE 8080 | |
CMD [ "node", "server.js" ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment