Skip to content

Instantly share code, notes, and snippets.

@thescientist13
Last active September 11, 2018 00:36
Show Gist options
  • Save thescientist13/2967635cffb4b9055753a5c404110b80 to your computer and use it in GitHub Desktop.
Save thescientist13/2967635cffb4b9055753a5c404110b80 to your computer and use it in GitHub Desktop.
ExpressJS Dockerfile
FROM node:8
# Create app directory
WORKDIR /usr/src/app
# Install app dependencies
# A wildcard is used to ensure both package.json
# AND package-lock.json are copied
COPY package*.json ./
RUN npm install
# Bundle app source to WORKDIR
COPY . .
EXPOSE 8080
CMD [ "npm", "start" ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment