Skip to content

Instantly share code, notes, and snippets.

@elcascarudo-dev
Created March 23, 2020 21:21
Show Gist options
  • Save elcascarudo-dev/5cb22cbc445a60a1ac92c59136ac9faa to your computer and use it in GitHub Desktop.
Save elcascarudo-dev/5cb22cbc445a60a1ac92c59136ac9faa to your computer and use it in GitHub Desktop.
Empaquetar proyecto NodeJS en contenedor Docker
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