From 4d2e178d3847b5458602d908c48782b6b18cd62e Mon Sep 17 00:00:00 2001 From: Felipe Sateler Date: Thu, 4 Jan 2018 10:54:34 -0300 Subject: [PATCH] Add libssl1.0-dev mangling to the auto update script and run update.sh --- 2.3/stretch/Dockerfile | 14 ++++++++------ 2.3/stretch/slim/Dockerfile | 11 ++++++----- Dockerfile-debian.template | 2 ++ update.sh | 7 +++++++ 4 files changed, 23 insertions(+), 11 deletions(-) diff --git a/2.3/stretch/Dockerfile b/2.3/stretch/Dockerfile index 0daa9f370..5cdbbb94c 100644 --- a/2.3/stretch/Dockerfile +++ b/2.3/stretch/Dockerfile @@ -8,10 +8,10 @@ RUN mkdir -p /usr/local/etc \ } >> /usr/local/etc/gemrc ENV RUBY_MAJOR 2.3 -ENV RUBY_VERSION 2.3.5 -ENV RUBY_DOWNLOAD_SHA256 7d3a7dabb190c2da06c963063342ca9a214bcd26f2158e904f0ec059b065ffda -ENV RUBYGEMS_VERSION 2.6.14 -ENV BUNDLER_VERSION 1.15.4 +ENV RUBY_VERSION 2.3.6 +ENV RUBY_DOWNLOAD_SHA256 e0d969ac22d4a403c1204868bb9c0d068aa35045bb3934cf50b17b7f66059f56 +ENV RUBYGEMS_VERSION 2.7.4 +ENV BUNDLER_VERSION 1.16.1 # 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 @@ -21,8 +21,9 @@ RUN set -ex \ bison \ dpkg-dev \ libgdbm-dev \ - ruby \ + # ruby 2.3 on stretch can only support libssl1.0-dev (libssl dev from buildpack-deps is 1.1.x) libssl1.0-dev \ + ruby \ ' \ && apt-get update \ && apt-get install -y --no-install-recommends $buildDeps \ @@ -60,7 +61,8 @@ RUN set -ex \ && rm -r /usr/src/ruby \ \ && gem update --system "$RUBYGEMS_VERSION" \ - && gem install bundler --version "$BUNDLER_VERSION" --force + && gem install bundler --version "$BUNDLER_VERSION" --force \ + && rm -r /root/.gem/ # install things globally, for great justice # and don't create ".bundle" in all our apps diff --git a/2.3/stretch/slim/Dockerfile b/2.3/stretch/slim/Dockerfile index 2f22cf274..484f31f71 100644 --- a/2.3/stretch/slim/Dockerfile +++ b/2.3/stretch/slim/Dockerfile @@ -20,10 +20,10 @@ RUN mkdir -p /usr/local/etc \ } >> /usr/local/etc/gemrc ENV RUBY_MAJOR 2.3 -ENV RUBY_VERSION 2.3.5 -ENV RUBY_DOWNLOAD_SHA256 7d3a7dabb190c2da06c963063342ca9a214bcd26f2158e904f0ec059b065ffda -ENV RUBYGEMS_VERSION 2.6.14 -ENV BUNDLER_VERSION 1.15.4 +ENV RUBY_VERSION 2.3.6 +ENV RUBY_DOWNLOAD_SHA256 e0d969ac22d4a403c1204868bb9c0d068aa35045bb3934cf50b17b7f66059f56 +ENV RUBYGEMS_VERSION 2.7.4 +ENV BUNDLER_VERSION 1.16.1 # 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 @@ -85,7 +85,8 @@ RUN set -ex \ && rm -r /usr/src/ruby \ \ && gem update --system "$RUBYGEMS_VERSION" \ - && gem install bundler --version "$BUNDLER_VERSION" --force + && gem install bundler --version "$BUNDLER_VERSION" --force \ + && rm -r /root/.gem/ # install things globally, for great justice # and don't create ".bundle" in all our apps diff --git a/Dockerfile-debian.template b/Dockerfile-debian.template index 9ac03cb1d..fe02a2953 100644 --- a/Dockerfile-debian.template +++ b/Dockerfile-debian.template @@ -21,6 +21,8 @@ RUN set -ex \ bison \ dpkg-dev \ libgdbm-dev \ + # ruby 2.3 on stretch can only support libssl1.0-dev (libssl dev from buildpack-deps is 1.1.x) + libssl1.0-dev \ ruby \ ' \ && apt-get update \ diff --git a/update.sh b/update.sh index f02bf2749..5a31edfe2 100755 --- a/update.sh +++ b/update.sh @@ -87,6 +87,13 @@ for version in "${versions[@]}"; do -e 's!%%SHA256%%!'"$shaVal"'!g' \ -e 's!%%RUBYGEMS%%!'"$rubygems"'!g' \ -e 's!%%BUNDLER%%!'"$bundler"'!g' \ + -e "$( + if [ "$version" = 2.3 ] && [[ "$v" = stretch* ]]; then + echo 's/libssl-dev/libssl1.0-dev/g' + else + echo '/libssl1.0-dev/d' + fi + )" \ -e 's/^(FROM (debian|buildpack-deps|alpine)):.*/\1:'"$tag"'/' \ "$template" > "$dir/Dockerfile"