Skip to content

Instantly share code, notes, and snippets.

@leandromoreira
Created February 6, 2016 23:31
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 leandromoreira/064202f95ac831748e1e to your computer and use it in GitHub Desktop.
Save leandromoreira/064202f95ac831748e1e to your computer and use it in GitHub Desktop.
# we'll use an existent image which already have ruby installed
FROM ruby:2.3.0
# creating our app folder
RUN mkdir /myapp
# move to this folder
WORKDIR /myapp
# move the Gemfile to our app's root folder
ADD Gemfile /myapp/Gemfile
# move the Gemfile.lock too
ADD Gemfile.lock /myapp/Gemfile.lock
# updates the system gem
RUN gem update --system
# run bundle install for production
RUN bundle install --without development test
# copy my code's folder to myapp
ADD . /myapp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment