mirror of
https://github.com/docker-library/ruby.git
synced 2022-11-09 11:41:34 -05:00
Simplify bundler config so "bundle install" does the right thing by default
This commit is contained in:
parent
84808bbcd1
commit
f9a2625e38
6 changed files with 51 additions and 18 deletions
|
@ -22,8 +22,16 @@ RUN apt-get update \
|
|||
&& rm -r /usr/src/ruby
|
||||
|
||||
# skip installing gem documentation
|
||||
RUN echo 'gem: --no-rdoc --no-ri' >> /.gemrc
|
||||
RUN echo 'gem: --no-rdoc --no-ri' >> "$HOME/.gemrc"
|
||||
|
||||
RUN gem install bundler
|
||||
# install things globally, for great justice
|
||||
ENV GEM_HOME /usr/local/bundle
|
||||
ENV PATH $GEM_HOME/bin:$PATH
|
||||
RUN gem install bundler \
|
||||
&& bundle config --global path "$GEM_HOME" \
|
||||
&& bundle config --global bin "$GEM_HOME/bin"
|
||||
|
||||
# don't create ".bundle" in all our apps
|
||||
ENV BUNDLE_APP_CONFIG $GEM_HOME
|
||||
|
||||
CMD [ "irb" ]
|
||||
|
|
|
@ -1,10 +1,13 @@
|
|||
FROM ruby:1.9.3-p547
|
||||
|
||||
# throw errors if Gemfile has been modified since Gemfile.lock
|
||||
RUN bundle config --global frozen 1
|
||||
|
||||
RUN mkdir -p /usr/src/app
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
ONBUILD ADD Gemfile /usr/src/app/
|
||||
ONBUILD ADD Gemfile.lock /usr/src/app/
|
||||
ONBUILD RUN bundle install --system
|
||||
ONBUILD COPY Gemfile /usr/src/app/
|
||||
ONBUILD COPY Gemfile.lock /usr/src/app/
|
||||
ONBUILD RUN bundle install
|
||||
|
||||
ONBUILD ADD . /usr/src/app
|
||||
ONBUILD COPY . /usr/src/app
|
||||
|
|
|
@ -22,8 +22,16 @@ RUN apt-get update \
|
|||
&& rm -r /usr/src/ruby
|
||||
|
||||
# skip installing gem documentation
|
||||
RUN echo 'gem: --no-rdoc --no-ri' >> /.gemrc
|
||||
RUN echo 'gem: --no-rdoc --no-ri' >> "$HOME/.gemrc"
|
||||
|
||||
RUN gem install bundler
|
||||
# install things globally, for great justice
|
||||
ENV GEM_HOME /usr/local/bundle
|
||||
ENV PATH $GEM_HOME/bin:$PATH
|
||||
RUN gem install bundler \
|
||||
&& bundle config --global path "$GEM_HOME" \
|
||||
&& bundle config --global bin "$GEM_HOME/bin"
|
||||
|
||||
# don't create ".bundle" in all our apps
|
||||
ENV BUNDLE_APP_CONFIG $GEM_HOME
|
||||
|
||||
CMD [ "irb" ]
|
||||
|
|
|
@ -1,10 +1,13 @@
|
|||
FROM ruby:2.0.0-p576
|
||||
|
||||
# throw errors if Gemfile has been modified since Gemfile.lock
|
||||
RUN bundle config --global frozen 1
|
||||
|
||||
RUN mkdir -p /usr/src/app
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
ONBUILD ADD Gemfile /usr/src/app/
|
||||
ONBUILD ADD Gemfile.lock /usr/src/app/
|
||||
ONBUILD RUN bundle install --system
|
||||
ONBUILD COPY Gemfile /usr/src/app/
|
||||
ONBUILD COPY Gemfile.lock /usr/src/app/
|
||||
ONBUILD RUN bundle install
|
||||
|
||||
ONBUILD ADD . /usr/src/app
|
||||
ONBUILD COPY . /usr/src/app
|
||||
|
|
|
@ -22,8 +22,16 @@ RUN apt-get update \
|
|||
&& rm -r /usr/src/ruby
|
||||
|
||||
# skip installing gem documentation
|
||||
RUN echo 'gem: --no-rdoc --no-ri' >> /.gemrc
|
||||
RUN echo 'gem: --no-rdoc --no-ri' >> "$HOME/.gemrc"
|
||||
|
||||
RUN gem install bundler
|
||||
# install things globally, for great justice
|
||||
ENV GEM_HOME /usr/local/bundle
|
||||
ENV PATH $GEM_HOME/bin:$PATH
|
||||
RUN gem install bundler \
|
||||
&& bundle config --global path "$GEM_HOME" \
|
||||
&& bundle config --global bin "$GEM_HOME/bin"
|
||||
|
||||
# don't create ".bundle" in all our apps
|
||||
ENV BUNDLE_APP_CONFIG $GEM_HOME
|
||||
|
||||
CMD [ "irb" ]
|
||||
|
|
|
@ -1,10 +1,13 @@
|
|||
FROM ruby:2.1.3
|
||||
|
||||
# throw errors if Gemfile has been modified since Gemfile.lock
|
||||
RUN bundle config --global frozen 1
|
||||
|
||||
RUN mkdir -p /usr/src/app
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
ONBUILD ADD Gemfile /usr/src/app/
|
||||
ONBUILD ADD Gemfile.lock /usr/src/app/
|
||||
ONBUILD RUN bundle install --system
|
||||
ONBUILD COPY Gemfile /usr/src/app/
|
||||
ONBUILD COPY Gemfile.lock /usr/src/app/
|
||||
ONBUILD RUN bundle install
|
||||
|
||||
ONBUILD ADD . /usr/src/app
|
||||
ONBUILD COPY . /usr/src/app
|
||||
|
|
Loading…
Reference in a new issue