Skip to content

Instantly share code, notes, and snippets.

@jkinkead
Last active October 15, 2017 23:58
Show Gist options
  • Save jkinkead/4580c22561dc804ef8f22fed235782b2 to your computer and use it in GitHub Desktop.
Save jkinkead/4580c22561dc804ef8f22fed235782b2 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