From 4cba299a609debea1b81a8da9844e6d27fba5229 Mon Sep 17 00:00:00 2001 From: rymdhund Date: Thu, 15 Oct 2015 23:30:27 +0200 Subject: [PATCH] Verify ruby checksum in slim versions --- 2.0/slim/Dockerfile | 7 +++++-- 2.1/slim/Dockerfile | 7 +++++-- 2.2/slim/Dockerfile | 7 +++++-- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/2.0/slim/Dockerfile b/2.0/slim/Dockerfile index c3b87373c..e6be03291 100644 --- a/2.0/slim/Dockerfile +++ b/2.0/slim/Dockerfile @@ -15,6 +15,7 @@ RUN apt-get update \ ENV RUBY_MAJOR 2.0 ENV RUBY_VERSION 2.0.0-p647 +ENV RUBY_DOWNLOAD_SHA256 c88aaf5b4ec72e2cb7d290ff854f04d135939f6134f517002a9d65d5fc5e5bec ENV RUBYGEMS_VERSION 2.4.8 # skip installing gem documentation @@ -41,8 +42,10 @@ RUN buildDeps=' \ && apt-get install -y --no-install-recommends $buildDeps \ && rm -rf /var/lib/apt/lists/* \ && mkdir -p /usr/src/ruby \ - && curl -SL "http://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.bz2" \ - | tar -xjC /usr/src/ruby --strip-components=1 \ + && curl -fSL -o ruby.tar.gz "http://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.gz" \ + && echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.gz" | sha256sum -c - \ + && tar -xzf ruby.tar.gz -C /usr/src/ruby --strip-components=1 \ + && rm ruby.tar.gz \ && cd /usr/src/ruby \ && autoconf \ && ./configure --disable-install-doc \ diff --git a/2.1/slim/Dockerfile b/2.1/slim/Dockerfile index 8dc5a45a4..663084cc2 100644 --- a/2.1/slim/Dockerfile +++ b/2.1/slim/Dockerfile @@ -15,6 +15,7 @@ RUN apt-get update \ ENV RUBY_MAJOR 2.1 ENV RUBY_VERSION 2.1.7 +ENV RUBY_DOWNLOAD_SHA256 f59c1596ac39cc7e60126e7d3698c19f482f04060674fdfe0124e1752ba6dd81 ENV RUBYGEMS_VERSION 2.4.8 # skip installing gem documentation @@ -41,8 +42,10 @@ RUN buildDeps=' \ && apt-get install -y --no-install-recommends $buildDeps \ && rm -rf /var/lib/apt/lists/* \ && mkdir -p /usr/src/ruby \ - && curl -SL "http://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.bz2" \ - | tar -xjC /usr/src/ruby --strip-components=1 \ + && curl -fSL -o ruby.tar.gz "http://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.gz" \ + && echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.gz" | sha256sum -c - \ + && tar -xzf ruby.tar.gz -C /usr/src/ruby --strip-components=1 \ + && rm ruby.tar.gz \ && cd /usr/src/ruby \ && autoconf \ && ./configure --disable-install-doc \ diff --git a/2.2/slim/Dockerfile b/2.2/slim/Dockerfile index a0c8734e0..d37143b54 100644 --- a/2.2/slim/Dockerfile +++ b/2.2/slim/Dockerfile @@ -15,6 +15,7 @@ RUN apt-get update \ ENV RUBY_MAJOR 2.2 ENV RUBY_VERSION 2.2.3 +ENV RUBY_DOWNLOAD_SHA256 df795f2f99860745a416092a4004b016ccf77e8b82dec956b120f18bdc71edce ENV RUBYGEMS_VERSION 2.4.8 # skip installing gem documentation @@ -41,8 +42,10 @@ RUN buildDeps=' \ && apt-get install -y --no-install-recommends $buildDeps \ && rm -rf /var/lib/apt/lists/* \ && mkdir -p /usr/src/ruby \ - && curl -SL "http://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.bz2" \ - | tar -xjC /usr/src/ruby --strip-components=1 \ + && curl -fSL -o ruby.tar.gz "http://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.gz" \ + && echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.gz" | sha256sum -c - \ + && tar -xzf ruby.tar.gz -C /usr/src/ruby --strip-components=1 \ + && rm ruby.tar.gz \ && cd /usr/src/ruby \ && autoconf \ && ./configure --disable-install-doc \