Created
March 23, 2020 21:21
-
-
Save elcascarudo-dev/5cb22cbc445a60a1ac92c59136ac9faa to your computer and use it in GitHub Desktop.
Empaquetar proyecto NodeJS en contenedor Docker
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:10 | |
RUN mkdir -p /home/node/app/node_modules && chown -R node:node /home/node/app | |
WORKDIR /home/node/app | |
COPY package*.json ./ | |
USER node | |
RUN npm install | |
COPY --chown=node:node server/ . | |
EXPOSE 3000 | |
CMD [ "node", "server.js" ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment