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 #271 from infosiftr/gems

Bump RubyGems version for CVE fixes
This commit is contained in:
Tianon Gravi 2019-03-07 15:53:43 -08:00 committed by GitHub
commit cf386da652
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 34 additions and 18 deletions

View file

@ -13,7 +13,7 @@ RUN mkdir -p /usr/local/etc \
ENV RUBY_MAJOR 2.3
ENV RUBY_VERSION 2.3.8
ENV RUBY_DOWNLOAD_SHA256 910f635d84fd0d81ac9bdee0731279e6026cb4cd1315bbbb5dfb22e09c5c1dfe
ENV RUBYGEMS_VERSION 3.0.1
ENV RUBYGEMS_VERSION 3.0.3
# some of ruby's build scripts are written in ruby
# we purge system ruby later to make sure our final image uses what we just built

View file

@ -13,7 +13,7 @@ RUN mkdir -p /usr/local/etc \
ENV RUBY_MAJOR 2.3
ENV RUBY_VERSION 2.3.8
ENV RUBY_DOWNLOAD_SHA256 910f635d84fd0d81ac9bdee0731279e6026cb4cd1315bbbb5dfb22e09c5c1dfe
ENV RUBYGEMS_VERSION 3.0.1
ENV RUBYGEMS_VERSION 3.0.3
# some of ruby's build scripts are written in ruby
# we purge system ruby later to make sure our final image uses what we just built

View file

@ -10,7 +10,7 @@ RUN mkdir -p /usr/local/etc \
ENV RUBY_MAJOR 2.3
ENV RUBY_VERSION 2.3.8
ENV RUBY_DOWNLOAD_SHA256 910f635d84fd0d81ac9bdee0731279e6026cb4cd1315bbbb5dfb22e09c5c1dfe
ENV RUBYGEMS_VERSION 3.0.1
ENV RUBYGEMS_VERSION 3.0.3
# some of ruby's build scripts are written in ruby
# we purge system ruby later to make sure our final image uses what we just built

View file

@ -23,7 +23,7 @@ RUN mkdir -p /usr/local/etc \
ENV RUBY_MAJOR 2.3
ENV RUBY_VERSION 2.3.8
ENV RUBY_DOWNLOAD_SHA256 910f635d84fd0d81ac9bdee0731279e6026cb4cd1315bbbb5dfb22e09c5c1dfe
ENV RUBYGEMS_VERSION 3.0.1
ENV RUBYGEMS_VERSION 3.0.3
# some of ruby's build scripts are written in ruby
# we purge system ruby later to make sure our final image uses what we just built

View file

@ -10,7 +10,7 @@ RUN mkdir -p /usr/local/etc \
ENV RUBY_MAJOR 2.3
ENV RUBY_VERSION 2.3.8
ENV RUBY_DOWNLOAD_SHA256 910f635d84fd0d81ac9bdee0731279e6026cb4cd1315bbbb5dfb22e09c5c1dfe
ENV RUBYGEMS_VERSION 3.0.1
ENV RUBYGEMS_VERSION 3.0.3
# some of ruby's build scripts are written in ruby
# we purge system ruby later to make sure our final image uses what we just built

View file

@ -23,7 +23,7 @@ RUN mkdir -p /usr/local/etc \
ENV RUBY_MAJOR 2.3
ENV RUBY_VERSION 2.3.8
ENV RUBY_DOWNLOAD_SHA256 910f635d84fd0d81ac9bdee0731279e6026cb4cd1315bbbb5dfb22e09c5c1dfe
ENV RUBYGEMS_VERSION 3.0.1
ENV RUBYGEMS_VERSION 3.0.3
# some of ruby's build scripts are written in ruby
# we purge system ruby later to make sure our final image uses what we just built

View file

@ -13,7 +13,7 @@ RUN mkdir -p /usr/local/etc \
ENV RUBY_MAJOR 2.4
ENV RUBY_VERSION 2.4.5
ENV RUBY_DOWNLOAD_SHA256 2f0cdcce9989f63ef7c2939bdb17b1ef244c4f384d85b8531d60e73d8cc31eeb
ENV RUBYGEMS_VERSION 3.0.1
ENV RUBYGEMS_VERSION 3.0.3
# some of ruby's build scripts are written in ruby
# we purge system ruby later to make sure our final image uses what we just built

View file

@ -13,7 +13,7 @@ RUN mkdir -p /usr/local/etc \
ENV RUBY_MAJOR 2.4
ENV RUBY_VERSION 2.4.5
ENV RUBY_DOWNLOAD_SHA256 2f0cdcce9989f63ef7c2939bdb17b1ef244c4f384d85b8531d60e73d8cc31eeb
ENV RUBYGEMS_VERSION 3.0.1
ENV RUBYGEMS_VERSION 3.0.3
# some of ruby's build scripts are written in ruby
# we purge system ruby later to make sure our final image uses what we just built

View file

@ -10,7 +10,7 @@ RUN mkdir -p /usr/local/etc \
ENV RUBY_MAJOR 2.4
ENV RUBY_VERSION 2.4.5
ENV RUBY_DOWNLOAD_SHA256 2f0cdcce9989f63ef7c2939bdb17b1ef244c4f384d85b8531d60e73d8cc31eeb
ENV RUBYGEMS_VERSION 3.0.1
ENV RUBYGEMS_VERSION 3.0.3
# some of ruby's build scripts are written in ruby
# we purge system ruby later to make sure our final image uses what we just built

View file

@ -23,7 +23,7 @@ RUN mkdir -p /usr/local/etc \
ENV RUBY_MAJOR 2.4
ENV RUBY_VERSION 2.4.5
ENV RUBY_DOWNLOAD_SHA256 2f0cdcce9989f63ef7c2939bdb17b1ef244c4f384d85b8531d60e73d8cc31eeb
ENV RUBYGEMS_VERSION 3.0.1
ENV RUBYGEMS_VERSION 3.0.3
# some of ruby's build scripts are written in ruby
# we purge system ruby later to make sure our final image uses what we just built

View file

@ -10,7 +10,7 @@ RUN mkdir -p /usr/local/etc \
ENV RUBY_MAJOR 2.4
ENV RUBY_VERSION 2.4.5
ENV RUBY_DOWNLOAD_SHA256 2f0cdcce9989f63ef7c2939bdb17b1ef244c4f384d85b8531d60e73d8cc31eeb
ENV RUBYGEMS_VERSION 3.0.1
ENV RUBYGEMS_VERSION 3.0.3
# some of ruby's build scripts are written in ruby
# we purge system ruby later to make sure our final image uses what we just built

View file

@ -23,7 +23,7 @@ RUN mkdir -p /usr/local/etc \
ENV RUBY_MAJOR 2.4
ENV RUBY_VERSION 2.4.5
ENV RUBY_DOWNLOAD_SHA256 2f0cdcce9989f63ef7c2939bdb17b1ef244c4f384d85b8531d60e73d8cc31eeb
ENV RUBYGEMS_VERSION 3.0.1
ENV RUBYGEMS_VERSION 3.0.3
# some of ruby's build scripts are written in ruby
# we purge system ruby later to make sure our final image uses what we just built

View file

@ -13,7 +13,7 @@ RUN mkdir -p /usr/local/etc \
ENV RUBY_MAJOR 2.5
ENV RUBY_VERSION 2.5.3
ENV RUBY_DOWNLOAD_SHA256 1cc9d0359a8ea35fc6111ec830d12e60168f3b9b305a3c2578357d360fcf306f
ENV RUBYGEMS_VERSION 3.0.1
ENV RUBYGEMS_VERSION 3.0.3
# some of ruby's build scripts are written in ruby
# we purge system ruby later to make sure our final image uses what we just built

View file

@ -13,7 +13,7 @@ RUN mkdir -p /usr/local/etc \
ENV RUBY_MAJOR 2.5
ENV RUBY_VERSION 2.5.3
ENV RUBY_DOWNLOAD_SHA256 1cc9d0359a8ea35fc6111ec830d12e60168f3b9b305a3c2578357d360fcf306f
ENV RUBYGEMS_VERSION 3.0.1
ENV RUBYGEMS_VERSION 3.0.3
# some of ruby's build scripts are written in ruby
# we purge system ruby later to make sure our final image uses what we just built

View file

@ -10,7 +10,7 @@ RUN mkdir -p /usr/local/etc \
ENV RUBY_MAJOR 2.5
ENV RUBY_VERSION 2.5.3
ENV RUBY_DOWNLOAD_SHA256 1cc9d0359a8ea35fc6111ec830d12e60168f3b9b305a3c2578357d360fcf306f
ENV RUBYGEMS_VERSION 3.0.1
ENV RUBYGEMS_VERSION 3.0.3
# some of ruby's build scripts are written in ruby
# we purge system ruby later to make sure our final image uses what we just built

View file

@ -23,7 +23,7 @@ RUN mkdir -p /usr/local/etc \
ENV RUBY_MAJOR 2.5
ENV RUBY_VERSION 2.5.3
ENV RUBY_DOWNLOAD_SHA256 1cc9d0359a8ea35fc6111ec830d12e60168f3b9b305a3c2578357d360fcf306f
ENV RUBYGEMS_VERSION 3.0.1
ENV RUBYGEMS_VERSION 3.0.3
# some of ruby's build scripts are written in ruby
# we purge system ruby later to make sure our final image uses what we just built

View file

@ -13,6 +13,7 @@ RUN mkdir -p /usr/local/etc \
ENV RUBY_MAJOR 2.6
ENV RUBY_VERSION 2.6.1
ENV RUBY_DOWNLOAD_SHA256 47b629808e9fd44ce1f760cdf3ed14875fc9b19d4f334e82e2cf25cb2898f2f2
ENV RUBYGEMS_VERSION 3.0.3
# some of ruby's build scripts are written in ruby
# we purge system ruby later to make sure our final image uses what we just built
@ -100,6 +101,9 @@ RUN set -ex \
&& apk del --no-network .ruby-builddeps \
&& cd / \
&& rm -r /usr/src/ruby \
# make sure bundled "rubygems" is older than RUBYGEMS_VERSION (https://github.com/docker-library/ruby/issues/246)
&& ruby -e 'exit(Gem::Version.create(ENV["RUBYGEMS_VERSION"]) > Gem::Version.create(Gem::VERSION))' \
&& gem update --system "$RUBYGEMS_VERSION" && rm -r /root/.gem/ \
# rough smoke test
&& ruby --version && gem --version && bundle --version

View file

@ -13,6 +13,7 @@ RUN mkdir -p /usr/local/etc \
ENV RUBY_MAJOR 2.6
ENV RUBY_VERSION 2.6.1
ENV RUBY_DOWNLOAD_SHA256 47b629808e9fd44ce1f760cdf3ed14875fc9b19d4f334e82e2cf25cb2898f2f2
ENV RUBYGEMS_VERSION 3.0.3
# some of ruby's build scripts are written in ruby
# we purge system ruby later to make sure our final image uses what we just built
@ -100,6 +101,9 @@ RUN set -ex \
&& apk del --no-network .ruby-builddeps \
&& cd / \
&& rm -r /usr/src/ruby \
# make sure bundled "rubygems" is older than RUBYGEMS_VERSION (https://github.com/docker-library/ruby/issues/246)
&& ruby -e 'exit(Gem::Version.create(ENV["RUBYGEMS_VERSION"]) > Gem::Version.create(Gem::VERSION))' \
&& gem update --system "$RUBYGEMS_VERSION" && rm -r /root/.gem/ \
# rough smoke test
&& ruby --version && gem --version && bundle --version

View file

@ -10,6 +10,7 @@ RUN mkdir -p /usr/local/etc \
ENV RUBY_MAJOR 2.6
ENV RUBY_VERSION 2.6.1
ENV RUBY_DOWNLOAD_SHA256 47b629808e9fd44ce1f760cdf3ed14875fc9b19d4f334e82e2cf25cb2898f2f2
ENV RUBYGEMS_VERSION 3.0.3
# some of ruby's build scripts are written in ruby
# we purge system ruby later to make sure our final image uses what we just built
@ -55,6 +56,9 @@ RUN set -ex \
&& apt-get purge -y --auto-remove $buildDeps \
&& cd / \
&& rm -r /usr/src/ruby \
# make sure bundled "rubygems" is older than RUBYGEMS_VERSION (https://github.com/docker-library/ruby/issues/246)
&& ruby -e 'exit(Gem::Version.create(ENV["RUBYGEMS_VERSION"]) > Gem::Version.create(Gem::VERSION))' \
&& gem update --system "$RUBYGEMS_VERSION" && rm -r /root/.gem/ \
# rough smoke test
&& ruby --version && gem --version && bundle --version

View file

@ -23,6 +23,7 @@ RUN mkdir -p /usr/local/etc \
ENV RUBY_MAJOR 2.6
ENV RUBY_VERSION 2.6.1
ENV RUBY_DOWNLOAD_SHA256 47b629808e9fd44ce1f760cdf3ed14875fc9b19d4f334e82e2cf25cb2898f2f2
ENV RUBYGEMS_VERSION 3.0.3
# some of ruby's build scripts are written in ruby
# we purge system ruby later to make sure our final image uses what we just built
@ -87,6 +88,9 @@ RUN set -ex \
\
&& cd / \
&& rm -r /usr/src/ruby \
# make sure bundled "rubygems" is older than RUBYGEMS_VERSION (https://github.com/docker-library/ruby/issues/246)
&& ruby -e 'exit(Gem::Version.create(ENV["RUBYGEMS_VERSION"]) > Gem::Version.create(Gem::VERSION))' \
&& gem update --system "$RUBYGEMS_VERSION" && rm -r /root/.gem/ \
# rough smoke test
&& ruby --version && gem --version && bundle --version

View file

@ -18,9 +18,9 @@ latest_gem_version() {
}
# https://github.com/docker-library/ruby/issues/246
rubygems='3.0.1'
rubygems='3.0.3'
declare -A newEnoughRubygems=(
[2.6]=1 # 3.0.1+
# [2.6]=1 # 2.6.1 => gems 3.0.1
)
# TODO once all versions are in this family of "new enough", remove RUBYGEMS_VERSION code entirely