Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save alaingoldman/e4dc2cabce3ed5c968e9ad07dec2dabb to your computer and use it in GitHub Desktop.

Select an option

Save alaingoldman/e4dc2cabce3ed5c968e9ad07dec2dabb to your computer and use it in GitHub Desktop.
# base image
FROM node:9.6.1
# set working directory
RUN mkdir /usr/src/app
WORKDIR /usr/src/app
# add `/usr/src/app/node_modules/.bin` to $PATH
ENV PATH /usr/src/app/node_modules/.bin:$PATH
# install and cache app dependencies
COPY package.json /usr/src/app/package.json
RUN npm install --silent
RUN npm install [email protected] -g --silent
# start app
CMD ["npm", "start"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment