Skip to content

Instantly share code, notes, and snippets.

@clalimarmo
Last active September 9, 2015 15:17
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 clalimarmo/f9fb1c1492f952d2f425 to your computer and use it in GitHub Desktop.
Save clalimarmo/f9fb1c1492f952d2f425 to your computer and use it in GitHub Desktop.
Rails development environment with Docker, Dockerfile
FROM ruby:2.2.3
RUN \
apt-get update -qq && \
apt-get install -y build-essential
RUN mkdir app
WORKDIR app
COPY Gemfile ./
RUN bundle install
COPY . ./
@mattmenefee
Copy link

You might also want to add the follow after line 4 to clean up after the package installations:

  # cleanup after installations
  apt-get autoremove -y && \
  apt-get clean all && \
  rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

@mattmenefee
Copy link

You should also add the Gemfile.lock before the rest of the repo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment