Skip to content

Instantly share code, notes, and snippets.

@aherve
Created March 11, 2016 13:06
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 aherve/99418dfcc14d9cb9afe8 to your computer and use it in GitHub Desktop.
Save aherve/99418dfcc14d9cb9afe8 to your computer and use it in GitHub Desktop.
# use our bootstrap image
FROM bootstrap_demo
# /app already exists. no need to create it
WORKDIR /app
# add the precompiled node_modules to our workdir
RUN ln -sf /tmp/node_modules .
# Add the newest package.json. Perhaps it's different from base-package.json. Perhaps not
ADD ./package.json .
# install dependencies based on the newest file.
# if package.json == base-package.json then this will success
# very quickly instead of rebuilding everything
RUN npm install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment