File tree Expand file tree Collapse file tree 6 files changed +51
-18
lines changed Expand file tree Collapse file tree 6 files changed +51
-18
lines changed Original file line number Diff line number Diff line change @@ -22,8 +22,16 @@ RUN apt-get update \
2222 && rm -r /usr/src/ruby
2323
2424# skip installing gem documentation
25- RUN echo 'gem: --no-rdoc --no-ri' >> /.gemrc
25+ RUN echo 'gem: --no-rdoc --no-ri' >> "$HOME /.gemrc"
2626
27- RUN gem install bundler
27+ # install things globally, for great justice
28+ ENV GEM_HOME /usr/local/bundle
29+ ENV PATH $GEM_HOME/bin:$PATH
30+ RUN gem install bundler \
31+ && bundle config --global path "$GEM_HOME" \
32+ && bundle config --global bin "$GEM_HOME/bin"
33+
34+ # don't create ".bundle" in all our apps
35+ ENV BUNDLE_APP_CONFIG $GEM_HOME
2836
2937CMD [ "irb" ]
Original file line number Diff line number Diff line change 11FROM ruby:1.9.3-p547
22
3+ # throw errors if Gemfile has been modified since Gemfile.lock
4+ RUN bundle config --global frozen 1
5+
36RUN mkdir -p /usr/src/app
47WORKDIR /usr/src/app
58
6- ONBUILD ADD Gemfile /usr/src/app/
7- ONBUILD ADD Gemfile.lock /usr/src/app/
8- ONBUILD RUN bundle install --system
9+ ONBUILD COPY Gemfile /usr/src/app/
10+ ONBUILD COPY Gemfile.lock /usr/src/app/
11+ ONBUILD RUN bundle install
912
10- ONBUILD ADD . /usr/src/app
13+ ONBUILD COPY . /usr/src/app
Original file line number Diff line number Diff line change @@ -22,8 +22,16 @@ RUN apt-get update \
2222 && rm -r /usr/src/ruby
2323
2424# skip installing gem documentation
25- RUN echo 'gem: --no-rdoc --no-ri' >> /.gemrc
25+ RUN echo 'gem: --no-rdoc --no-ri' >> "$HOME /.gemrc"
2626
27- RUN gem install bundler
27+ # install things globally, for great justice
28+ ENV GEM_HOME /usr/local/bundle
29+ ENV PATH $GEM_HOME/bin:$PATH
30+ RUN gem install bundler \
31+ && bundle config --global path "$GEM_HOME" \
32+ && bundle config --global bin "$GEM_HOME/bin"
33+
34+ # don't create ".bundle" in all our apps
35+ ENV BUNDLE_APP_CONFIG $GEM_HOME
2836
2937CMD [ "irb" ]
Original file line number Diff line number Diff line change 11FROM ruby:2.0.0-p576
22
3+ # throw errors if Gemfile has been modified since Gemfile.lock
4+ RUN bundle config --global frozen 1
5+
36RUN mkdir -p /usr/src/app
47WORKDIR /usr/src/app
58
6- ONBUILD ADD Gemfile /usr/src/app/
7- ONBUILD ADD Gemfile.lock /usr/src/app/
8- ONBUILD RUN bundle install --system
9+ ONBUILD COPY Gemfile /usr/src/app/
10+ ONBUILD COPY Gemfile.lock /usr/src/app/
11+ ONBUILD RUN bundle install
912
10- ONBUILD ADD . /usr/src/app
13+ ONBUILD COPY . /usr/src/app
Original file line number Diff line number Diff line change @@ -22,8 +22,16 @@ RUN apt-get update \
2222 && rm -r /usr/src/ruby
2323
2424# skip installing gem documentation
25- RUN echo 'gem: --no-rdoc --no-ri' >> /.gemrc
25+ RUN echo 'gem: --no-rdoc --no-ri' >> "$HOME /.gemrc"
2626
27- RUN gem install bundler
27+ # install things globally, for great justice
28+ ENV GEM_HOME /usr/local/bundle
29+ ENV PATH $GEM_HOME/bin:$PATH
30+ RUN gem install bundler \
31+ && bundle config --global path "$GEM_HOME" \
32+ && bundle config --global bin "$GEM_HOME/bin"
33+
34+ # don't create ".bundle" in all our apps
35+ ENV BUNDLE_APP_CONFIG $GEM_HOME
2836
2937CMD [ "irb" ]
Original file line number Diff line number Diff line change 11FROM ruby:2.1.3
22
3+ # throw errors if Gemfile has been modified since Gemfile.lock
4+ RUN bundle config --global frozen 1
5+
36RUN mkdir -p /usr/src/app
47WORKDIR /usr/src/app
58
6- ONBUILD ADD Gemfile /usr/src/app/
7- ONBUILD ADD Gemfile.lock /usr/src/app/
8- ONBUILD RUN bundle install --system
9+ ONBUILD COPY Gemfile /usr/src/app/
10+ ONBUILD COPY Gemfile.lock /usr/src/app/
11+ ONBUILD RUN bundle install
912
10- ONBUILD ADD . /usr/src/app
13+ ONBUILD COPY . /usr/src/app
You can’t perform that action at this time.
0 commit comments