Skip to content

Instantly share code, notes, and snippets.

@mattc41190
Created July 14, 2017 01:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattc41190/d9fab6ce49f65118534c26acf6d2543b to your computer and use it in GitHub Desktop.
Save mattc41190/d9fab6ce49f65118534c26acf6d2543b to your computer and use it in GitHub Desktop.
Simple Server Dockerfile
# Choose a base image
FROM node:8.1.3
# Make a landing zone for our app
RUN mkdir app
# Copy the contents of the pwd/cwd into the image's /app directory
COPY . /app
# Go into the /app dir and run npm install
RUN cd /app; npm install
# Choose some ports to expose to the host machine
EXPOSE 3344 80
# Choose a dir from which to call commands
WORKDIR "/app"
# Choose a command for the image to do at run time
ENTRYPOINT ["node", "server.js"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment