Skip to content

Instantly share code, notes, and snippets.

@pbabbott
Created August 8, 2018 21:34
Show Gist options
  • Save pbabbott/5a3b867da50dd5c1fc680fb6c968d233 to your computer and use it in GitHub Desktop.
Save pbabbott/5a3b867da50dd5c1fc680fb6c968d233 to your computer and use it in GitHub Desktop.
Example dockerfile for a node app
FROM node:9
# Create app directory
WORKDIR /usr/src/app
# Install app dependencies
COPY package.json ./
COPY yarn.lock ./
RUN yarn install
# Bundle app source
COPY . .
EXPOSE 3000
CMD [ "npm", "start" ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment