1
0
Fork 0
mirror of https://github.com/docker-library/ruby.git synced 2022-11-09 11:41:34 -05:00

Merge pull request #44 from infosiftr/explicit-bundler

Add an explicit BUNDLER_VERSION
This commit is contained in:
yosifkit 2015-06-12 12:09:48 -07:00
commit e553432e6a
10 changed files with 71 additions and 15 deletions

View file

@ -28,7 +28,10 @@ RUN echo 'gem: --no-rdoc --no-ri' >> "$HOME/.gemrc"
# install things globally, for great justice
ENV GEM_HOME /usr/local/bundle
ENV PATH $GEM_HOME/bin:$PATH
RUN gem install bundler \
ENV BUNDLER_VERSION 1.10.3
RUN gem install bundler --version "$BUNDLER_VERSION" \
&& bundle config --global path "$GEM_HOME" \
&& bundle config --global bin "$GEM_HOME/bin"

View file

@ -48,8 +48,19 @@ RUN buildDeps=' \
&& apt-get purge -y --auto-remove $buildDeps
# 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
ENV BUNDLER_VERSION 1.10.3
RUN gem install bundler --version "$BUNDLER_VERSION" \
&& 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" ]

View file

@ -25,7 +25,10 @@ RUN echo 'gem: --no-rdoc --no-ri' >> "$HOME/.gemrc"
# install things globally, for great justice
ENV GEM_HOME /usr/local/bundle
ENV PATH $GEM_HOME/bin:$PATH
RUN gem install bundler \
ENV BUNDLER_VERSION 1.10.3
RUN gem install bundler --version "$BUNDLER_VERSION" \
&& bundle config --global path "$GEM_HOME" \
&& bundle config --global bin "$GEM_HOME/bin"

View file

@ -28,7 +28,10 @@ RUN echo 'gem: --no-rdoc --no-ri' >> "$HOME/.gemrc"
# install things globally, for great justice
ENV GEM_HOME /usr/local/bundle
ENV PATH $GEM_HOME/bin:$PATH
RUN gem install bundler \
ENV BUNDLER_VERSION 1.10.3
RUN gem install bundler --version "$BUNDLER_VERSION" \
&& bundle config --global path "$GEM_HOME" \
&& bundle config --global bin "$GEM_HOME/bin"

View file

@ -48,8 +48,19 @@ RUN buildDeps=' \
&& apt-get purge -y --auto-remove $buildDeps
# 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
ENV BUNDLER_VERSION 1.10.3
RUN gem install bundler --version "$BUNDLER_VERSION" \
&& 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" ]

View file

@ -25,7 +25,10 @@ RUN echo 'gem: --no-rdoc --no-ri' >> "$HOME/.gemrc"
# install things globally, for great justice
ENV GEM_HOME /usr/local/bundle
ENV PATH $GEM_HOME/bin:$PATH
RUN gem install bundler \
ENV BUNDLER_VERSION 1.10.3
RUN gem install bundler --version "$BUNDLER_VERSION" \
&& bundle config --global path "$GEM_HOME" \
&& bundle config --global bin "$GEM_HOME/bin"

View file

@ -28,7 +28,10 @@ RUN echo 'gem: --no-rdoc --no-ri' >> "$HOME/.gemrc"
# install things globally, for great justice
ENV GEM_HOME /usr/local/bundle
ENV PATH $GEM_HOME/bin:$PATH
RUN gem install bundler \
ENV BUNDLER_VERSION 1.10.3
RUN gem install bundler --version "$BUNDLER_VERSION" \
&& bundle config --global path "$GEM_HOME" \
&& bundle config --global bin "$GEM_HOME/bin"

View file

@ -48,8 +48,19 @@ RUN buildDeps=' \
&& apt-get purge -y --auto-remove $buildDeps
# 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
ENV BUNDLER_VERSION 1.10.3
RUN gem install bundler --version "$BUNDLER_VERSION" \
&& 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" ]

View file

@ -25,7 +25,10 @@ RUN echo 'gem: --no-rdoc --no-ri' >> "$HOME/.gemrc"
# install things globally, for great justice
ENV GEM_HOME /usr/local/bundle
ENV PATH $GEM_HOME/bin:$PATH
RUN gem install bundler \
ENV BUNDLER_VERSION 1.10.3
RUN gem install bundler --version "$BUNDLER_VERSION" \
&& bundle config --global path "$GEM_HOME" \
&& bundle config --global bin "$GEM_HOME/bin"

View file

@ -10,6 +10,8 @@ fi
versions=( "${versions[@]%/}" )
shaPage=$(curl -fsSL 'https://www.ruby-lang.org/en/downloads/')
bundler="$(curl -sSL 'https://rubygems.org/api/v1/gems/bundler.json' | sed -r 's/^.*"version":"([^"]+)".*$/\1/')"
for version in "${versions[@]}"; do
fullVersion="$(curl -sSL --compressed "http://cache.ruby-lang.org/pub/ruby/$version/" \
| grep -E '<a href="ruby-'"$version"'.[^"]+\.tar\.bz2' \
@ -19,9 +21,12 @@ for version in "${versions[@]}"; do
shaVal="$(echo $shaPage | sed -r "s/.*Ruby ${fullVersion}<\/a><br \/> sha256: ([^<]+).*/\1/")"
(
set -x
sed -ri 's/^(ENV RUBY_MAJOR) .*/\1 '"$version"'/' "$version/"{,wheezy/,slim/}Dockerfile
sed -ri 's/^(ENV RUBY_VERSION) .*/\1 '"$fullVersion"'/' "$version/"{,wheezy/,slim/}Dockerfile
sed -ri 's/^(ENV RUBY_DOWNLOAD_SHA256) .*/\1 '"$shaVal"'/' "$version/"{,wheezy/,slim/}Dockerfile
sed -ri '
s/^(ENV RUBY_MAJOR) .*/\1 '"$version"'/;
s/^(ENV RUBY_VERSION) .*/\1 '"$fullVersion"'/;
s/^(ENV RUBY_DOWNLOAD_SHA256) .*/\1 '"$shaVal"'/;
s/^(ENV BUNDLER_VERSION) .*/\1 '"$bundler"'/;
' "$version/"{,wheezy/,slim/}Dockerfile
sed -ri 's/^(FROM ruby):.*/\1:'"$fullVersion"'/' "$version/"*"/Dockerfile"
)
done