Skip to content

Instantly share code, notes, and snippets.

@kevinrobinson
Created November 13, 2015 22:41
Show Gist options
  • Select an option

  • Save kevinrobinson/49b1b8cfbdca7d55d653 to your computer and use it in GitHub Desktop.

Select an option

Save kevinrobinson/49b1b8cfbdca7d55d653 to your computer and use it in GitHub Desktop.
...
# Create a folder, and only copy the Gemfile and Gemfile.lock
RUN mkdir /mnt/somerville-teacher-tool
COPY Gemfile /mnt/somerville-teacher-tool/Gemfile
COPY Gemfile.lock /mnt/somerville-teacher-tool/Gemfile.lock
# Now run bundle install. This step will only be invalidated
# if the Gemfile or Gemfile.lock changes.
RUN bundle install
# And further setup, like copying in source code, can go here
# and Docker can rebuild from this point without having to run
# `bundle install` again.
COPY . /mnt/somerville-teacher-tool
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment