Skip to content

Instantly share code, notes, and snippets.

@agrcrobles
Forked from jkinkead/Dockerfile
Created October 15, 2017 23:58
Show Gist options
  • Save agrcrobles/dd4aeea1817a3d489b891c255251f609 to your computer and use it in GitHub Desktop.
Save agrcrobles/dd4aeea1817a3d489b891c255251f609 to your computer and use it in GitHub Desktop.
Naive Dockerfile
# You should always specify a full version here to ensure all of your developers
# are running the same version of Node.
FROM node:7.8.0
# The base node image sets a very verbose log level.
ENV NPM_CONFIG_LOGLEVEL warn
# Copy all local files into the image.
COPY . .
# Build for production.
RUN npm run build --production
# Install `serve` to run the application.
RUN npm install -g serve
# Set the command to start the node server.
CMD serve -s build
# Tell Docker about the port we'll run on.
EXPOSE 5000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment