From c9208def0c430de0144408e16140bd49254c4ca9 Mon Sep 17 00:00:00 2001 From: Joe Ferguson Date: Mon, 5 Dec 2016 10:31:07 -0800 Subject: [PATCH] Add 2.4-rc builds --- .travis.yml | 3 ++ 2.1/Dockerfile | 2 +- 2.1/alpine/Dockerfile | 2 +- 2.1/slim/Dockerfile | 2 +- 2.2/Dockerfile | 2 +- 2.2/alpine/Dockerfile | 2 +- 2.2/slim/Dockerfile | 2 +- 2.3/Dockerfile | 2 +- 2.3/alpine/Dockerfile | 2 +- 2.3/slim/Dockerfile | 2 +- 2.4-rc/Dockerfile | 72 +++++++++++++++++++++++++ 2.4-rc/alpine/Dockerfile | 107 +++++++++++++++++++++++++++++++++++++ 2.4-rc/onbuild/Dockerfile | 13 +++++ 2.4-rc/slim/Dockerfile | 94 ++++++++++++++++++++++++++++++++ Dockerfile-alpine.template | 2 +- Dockerfile-slim.template | 2 +- Dockerfile.template | 2 +- update.sh | 12 +++-- 18 files changed, 310 insertions(+), 15 deletions(-) create mode 100644 2.4-rc/Dockerfile create mode 100644 2.4-rc/alpine/Dockerfile create mode 100644 2.4-rc/onbuild/Dockerfile create mode 100644 2.4-rc/slim/Dockerfile diff --git a/.travis.yml b/.travis.yml index 604138190..ea10e42d4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,6 +2,9 @@ language: bash services: docker env: + - VERSION=2.4-rc VARIANT= + - VERSION=2.4-rc VARIANT=slim + - VERSION=2.4-rc VARIANT=alpine - VERSION=2.3 VARIANT= - VERSION=2.3 VARIANT=slim - VERSION=2.3 VARIANT=alpine diff --git a/2.1/Dockerfile b/2.1/Dockerfile index e15d1b5e9..7e03fc708 100644 --- a/2.1/Dockerfile +++ b/2.1/Dockerfile @@ -25,7 +25,7 @@ RUN set -ex \ && apt-get install -y --no-install-recommends $buildDeps \ && rm -rf /var/lib/apt/lists/* \ \ - && wget -O ruby.tar.gz "https://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.gz" \ + && wget -O ruby.tar.gz "https://cache.ruby-lang.org/pub/ruby/${RUBY_MAJOR%-rc}/ruby-$RUBY_VERSION.tar.gz" \ && echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.gz" | sha256sum -c - \ \ && mkdir -p /usr/src/ruby \ diff --git a/2.1/alpine/Dockerfile b/2.1/alpine/Dockerfile index 49c4eaf0d..2eb85af3d 100644 --- a/2.1/alpine/Dockerfile +++ b/2.1/alpine/Dockerfile @@ -43,7 +43,7 @@ RUN set -ex \ yaml-dev \ zlib-dev \ \ - && wget -O ruby.tar.gz "https://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.gz" \ + && wget -O ruby.tar.gz "https://cache.ruby-lang.org/pub/ruby/${RUBY_MAJOR%-rc}/ruby-$RUBY_VERSION.tar.gz" \ && echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.gz" | sha256sum -c - \ \ && mkdir -p /usr/src/ruby \ diff --git a/2.1/slim/Dockerfile b/2.1/slim/Dockerfile index fd150c789..4fa817212 100644 --- a/2.1/slim/Dockerfile +++ b/2.1/slim/Dockerfile @@ -47,7 +47,7 @@ RUN set -ex \ && apt-get install -y --no-install-recommends $buildDeps \ && rm -rf /var/lib/apt/lists/* \ \ - && wget -O ruby.tar.gz "https://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.gz" \ + && wget -O ruby.tar.gz "https://cache.ruby-lang.org/pub/ruby/${RUBY_MAJOR%-rc}/ruby-$RUBY_VERSION.tar.gz" \ && echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.gz" | sha256sum -c - \ \ && mkdir -p /usr/src/ruby \ diff --git a/2.2/Dockerfile b/2.2/Dockerfile index 39eb8fc63..63066f161 100644 --- a/2.2/Dockerfile +++ b/2.2/Dockerfile @@ -25,7 +25,7 @@ RUN set -ex \ && apt-get install -y --no-install-recommends $buildDeps \ && rm -rf /var/lib/apt/lists/* \ \ - && wget -O ruby.tar.gz "https://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.gz" \ + && wget -O ruby.tar.gz "https://cache.ruby-lang.org/pub/ruby/${RUBY_MAJOR%-rc}/ruby-$RUBY_VERSION.tar.gz" \ && echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.gz" | sha256sum -c - \ \ && mkdir -p /usr/src/ruby \ diff --git a/2.2/alpine/Dockerfile b/2.2/alpine/Dockerfile index f04c27273..e64a54429 100644 --- a/2.2/alpine/Dockerfile +++ b/2.2/alpine/Dockerfile @@ -43,7 +43,7 @@ RUN set -ex \ yaml-dev \ zlib-dev \ \ - && wget -O ruby.tar.gz "https://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.gz" \ + && wget -O ruby.tar.gz "https://cache.ruby-lang.org/pub/ruby/${RUBY_MAJOR%-rc}/ruby-$RUBY_VERSION.tar.gz" \ && echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.gz" | sha256sum -c - \ \ && mkdir -p /usr/src/ruby \ diff --git a/2.2/slim/Dockerfile b/2.2/slim/Dockerfile index 9a9a48361..1679196e5 100644 --- a/2.2/slim/Dockerfile +++ b/2.2/slim/Dockerfile @@ -47,7 +47,7 @@ RUN set -ex \ && apt-get install -y --no-install-recommends $buildDeps \ && rm -rf /var/lib/apt/lists/* \ \ - && wget -O ruby.tar.gz "https://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.gz" \ + && wget -O ruby.tar.gz "https://cache.ruby-lang.org/pub/ruby/${RUBY_MAJOR%-rc}/ruby-$RUBY_VERSION.tar.gz" \ && echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.gz" | sha256sum -c - \ \ && mkdir -p /usr/src/ruby \ diff --git a/2.3/Dockerfile b/2.3/Dockerfile index 4dd308ac7..960444751 100644 --- a/2.3/Dockerfile +++ b/2.3/Dockerfile @@ -25,7 +25,7 @@ RUN set -ex \ && apt-get install -y --no-install-recommends $buildDeps \ && rm -rf /var/lib/apt/lists/* \ \ - && wget -O ruby.tar.gz "https://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.gz" \ + && wget -O ruby.tar.gz "https://cache.ruby-lang.org/pub/ruby/${RUBY_MAJOR%-rc}/ruby-$RUBY_VERSION.tar.gz" \ && echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.gz" | sha256sum -c - \ \ && mkdir -p /usr/src/ruby \ diff --git a/2.3/alpine/Dockerfile b/2.3/alpine/Dockerfile index 3b30b2099..095cd199b 100644 --- a/2.3/alpine/Dockerfile +++ b/2.3/alpine/Dockerfile @@ -43,7 +43,7 @@ RUN set -ex \ yaml-dev \ zlib-dev \ \ - && wget -O ruby.tar.gz "https://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.gz" \ + && wget -O ruby.tar.gz "https://cache.ruby-lang.org/pub/ruby/${RUBY_MAJOR%-rc}/ruby-$RUBY_VERSION.tar.gz" \ && echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.gz" | sha256sum -c - \ \ && mkdir -p /usr/src/ruby \ diff --git a/2.3/slim/Dockerfile b/2.3/slim/Dockerfile index 4500a4ac1..ace13df33 100644 --- a/2.3/slim/Dockerfile +++ b/2.3/slim/Dockerfile @@ -47,7 +47,7 @@ RUN set -ex \ && apt-get install -y --no-install-recommends $buildDeps \ && rm -rf /var/lib/apt/lists/* \ \ - && wget -O ruby.tar.gz "https://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.gz" \ + && wget -O ruby.tar.gz "https://cache.ruby-lang.org/pub/ruby/${RUBY_MAJOR%-rc}/ruby-$RUBY_VERSION.tar.gz" \ && echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.gz" | sha256sum -c - \ \ && mkdir -p /usr/src/ruby \ diff --git a/2.4-rc/Dockerfile b/2.4-rc/Dockerfile new file mode 100644 index 000000000..73a8b7036 --- /dev/null +++ b/2.4-rc/Dockerfile @@ -0,0 +1,72 @@ +FROM buildpack-deps:jessie + +# skip installing gem documentation +RUN mkdir -p /usr/local/etc \ + && { \ + echo 'install: --no-document'; \ + echo 'update: --no-document'; \ + } >> /usr/local/etc/gemrc + +ENV RUBY_MAJOR 2.4-rc +ENV RUBY_VERSION 2.4.0-preview3 +ENV RUBY_DOWNLOAD_SHA256 c35fe752ccfabf69bf48e6aab5111c25a05938b428936f780638e2111934c9dd +ENV RUBYGEMS_VERSION 2.6.8 + +# 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 +RUN set -ex \ + \ + && buildDeps=' \ + bison \ + libgdbm-dev \ + ruby \ + ' \ + && apt-get update \ + && apt-get install -y --no-install-recommends $buildDeps \ + && rm -rf /var/lib/apt/lists/* \ + \ + && wget -O ruby.tar.gz "https://cache.ruby-lang.org/pub/ruby/${RUBY_MAJOR%-rc}/ruby-$RUBY_VERSION.tar.gz" \ + && echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.gz" | sha256sum -c - \ + \ + && mkdir -p /usr/src/ruby \ + && tar -xzf ruby.tar.gz -C /usr/src/ruby --strip-components=1 \ + && rm ruby.tar.gz \ + \ + && cd /usr/src/ruby \ + \ +# hack in "ENABLE_PATH_CHECK" disabling to suppress: +# warning: Insecure world writable dir + && { \ + echo '#define ENABLE_PATH_CHECK 0'; \ + echo; \ + cat file.c; \ + } > file.c.new \ + && mv file.c.new file.c \ + \ + && autoconf \ + && ./configure --disable-install-doc --enable-shared \ + && make -j"$(nproc)" \ + && make install \ + \ + && apt-get purge -y --auto-remove $buildDeps \ + && cd / \ + && rm -r /usr/src/ruby \ + \ + && gem update --system "$RUBYGEMS_VERSION" + +ENV BUNDLER_VERSION 1.13.6 + +RUN gem install bundler --version "$BUNDLER_VERSION" + +# install things globally, for great justice +# and don't create ".bundle" in all our apps +ENV GEM_HOME /usr/local/bundle +ENV BUNDLE_PATH="$GEM_HOME" \ + BUNDLE_BIN="$GEM_HOME/bin" \ + BUNDLE_SILENCE_ROOT_WARNING=1 \ + BUNDLE_APP_CONFIG="$GEM_HOME" +ENV PATH $BUNDLE_BIN:$PATH +RUN mkdir -p "$GEM_HOME" "$BUNDLE_BIN" \ + && chmod 777 "$GEM_HOME" "$BUNDLE_BIN" + +CMD [ "irb" ] diff --git a/2.4-rc/alpine/Dockerfile b/2.4-rc/alpine/Dockerfile new file mode 100644 index 000000000..a5fcd14b1 --- /dev/null +++ b/2.4-rc/alpine/Dockerfile @@ -0,0 +1,107 @@ +FROM alpine:3.4 + +# skip installing gem documentation +RUN mkdir -p /usr/local/etc \ + && { \ + echo 'install: --no-document'; \ + echo 'update: --no-document'; \ + } >> /usr/local/etc/gemrc + +ENV RUBY_MAJOR 2.4-rc +ENV RUBY_VERSION 2.4.0-preview3 +ENV RUBY_DOWNLOAD_SHA256 c35fe752ccfabf69bf48e6aab5111c25a05938b428936f780638e2111934c9dd +ENV RUBYGEMS_VERSION 2.6.8 + +# 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 +# readline-dev vs libedit-dev: https://bugs.ruby-lang.org/issues/11869 and https://github.com/docker-library/ruby/issues/75 +RUN set -ex \ + \ + && apk add --no-cache --virtual .ruby-builddeps \ + autoconf \ + bison \ + bzip2 \ + bzip2-dev \ + ca-certificates \ + coreutils \ + gcc \ + gdbm-dev \ + glib-dev \ + libc-dev \ + libffi-dev \ + libxml2-dev \ + libxslt-dev \ + linux-headers \ + make \ + ncurses-dev \ + openssl \ + openssl-dev \ + procps \ + readline-dev \ + ruby \ + tar \ + yaml-dev \ + zlib-dev \ + \ + && wget -O ruby.tar.gz "https://cache.ruby-lang.org/pub/ruby/${RUBY_MAJOR%-rc}/ruby-$RUBY_VERSION.tar.gz" \ + && echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.gz" | sha256sum -c - \ + \ + && mkdir -p /usr/src/ruby \ + && tar -xzf ruby.tar.gz -C /usr/src/ruby --strip-components=1 \ + && rm ruby.tar.gz \ + \ + && cd /usr/src/ruby \ + \ +# hack in "ENABLE_PATH_CHECK" disabling to suppress: +# warning: Insecure world writable dir + && { \ + echo '#define ENABLE_PATH_CHECK 0'; \ + echo; \ + cat file.c; \ + } > file.c.new \ + && mv file.c.new file.c \ + \ + && autoconf \ +# the configure script does not detect isnan/isinf as macros + && ac_cv_func_isnan=yes ac_cv_func_isinf=yes \ + ./configure --disable-install-doc --enable-shared \ + && make -j"$(getconf _NPROCESSORS_ONLN)" \ + && make install \ + \ + && runDeps="$( \ + scanelf --needed --nobanner --recursive /usr/local \ + | awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \ + | sort -u \ + | xargs -r apk info --installed \ + | sort -u \ + )" \ + && apk add --virtual .ruby-rundeps $runDeps \ + bzip2 \ + ca-certificates \ + libffi-dev \ + openssl-dev \ + yaml-dev \ + procps \ + zlib-dev \ + && apk del .ruby-builddeps \ + && cd / \ + && rm -r /usr/src/ruby \ + \ + && gem update --system "$RUBYGEMS_VERSION" + +ENV BUNDLER_VERSION 1.13.6 + +RUN gem install bundler --version "$BUNDLER_VERSION" + +# install things globally, for great justice +# and don't create ".bundle" in all our apps +ENV GEM_HOME /usr/local/bundle +ENV BUNDLE_PATH="$GEM_HOME" \ + BUNDLE_BIN="$GEM_HOME/bin" \ + BUNDLE_SILENCE_ROOT_WARNING=1 \ + BUNDLE_APP_CONFIG="$GEM_HOME" +ENV PATH $BUNDLE_BIN:$PATH +RUN mkdir -p "$GEM_HOME" "$BUNDLE_BIN" \ + && chmod 777 "$GEM_HOME" "$BUNDLE_BIN" + +CMD [ "irb" ] diff --git a/2.4-rc/onbuild/Dockerfile b/2.4-rc/onbuild/Dockerfile new file mode 100644 index 000000000..0ca0f0de3 --- /dev/null +++ b/2.4-rc/onbuild/Dockerfile @@ -0,0 +1,13 @@ +FROM ruby:2.4-rc + +# 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 COPY Gemfile /usr/src/app/ +ONBUILD COPY Gemfile.lock /usr/src/app/ +ONBUILD RUN bundle install + +ONBUILD COPY . /usr/src/app diff --git a/2.4-rc/slim/Dockerfile b/2.4-rc/slim/Dockerfile new file mode 100644 index 000000000..8c94ff928 --- /dev/null +++ b/2.4-rc/slim/Dockerfile @@ -0,0 +1,94 @@ +FROM debian:jessie + +RUN apt-get update \ + && apt-get install -y --no-install-recommends \ + bzip2 \ + ca-certificates \ + libffi-dev \ + libgdbm3 \ + libssl-dev \ + libyaml-dev \ + procps \ + zlib1g-dev \ + && rm -rf /var/lib/apt/lists/* + +# skip installing gem documentation +RUN mkdir -p /usr/local/etc \ + && { \ + echo 'install: --no-document'; \ + echo 'update: --no-document'; \ + } >> /usr/local/etc/gemrc + +ENV RUBY_MAJOR 2.4-rc +ENV RUBY_VERSION 2.4.0-preview3 +ENV RUBY_DOWNLOAD_SHA256 c35fe752ccfabf69bf48e6aab5111c25a05938b428936f780638e2111934c9dd +ENV RUBYGEMS_VERSION 2.6.8 + +# 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 +RUN set -ex \ + \ + && buildDeps=' \ + autoconf \ + bison \ + gcc \ + libbz2-dev \ + libgdbm-dev \ + libglib2.0-dev \ + libncurses-dev \ + libreadline-dev \ + libxml2-dev \ + libxslt-dev \ + make \ + ruby \ + wget \ + ' \ + && apt-get update \ + && apt-get install -y --no-install-recommends $buildDeps \ + && rm -rf /var/lib/apt/lists/* \ + \ + && wget -O ruby.tar.gz "https://cache.ruby-lang.org/pub/ruby/${RUBY_MAJOR%-rc}/ruby-$RUBY_VERSION.tar.gz" \ + && echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.gz" | sha256sum -c - \ + \ + && mkdir -p /usr/src/ruby \ + && tar -xzf ruby.tar.gz -C /usr/src/ruby --strip-components=1 \ + && rm ruby.tar.gz \ + \ + && cd /usr/src/ruby \ + \ +# hack in "ENABLE_PATH_CHECK" disabling to suppress: +# warning: Insecure world writable dir + && { \ + echo '#define ENABLE_PATH_CHECK 0'; \ + echo; \ + cat file.c; \ + } > file.c.new \ + && mv file.c.new file.c \ + \ + && autoconf \ + && ./configure --disable-install-doc --enable-shared \ + && make -j"$(nproc)" \ + && make install \ + \ + && apt-get purge -y --auto-remove $buildDeps \ + && cd / \ + && rm -r /usr/src/ruby \ + \ + && gem update --system "$RUBYGEMS_VERSION" + +ENV BUNDLER_VERSION 1.13.6 + +RUN gem install bundler --version "$BUNDLER_VERSION" + +# install things globally, for great justice +# and don't create ".bundle" in all our apps +ENV GEM_HOME /usr/local/bundle +ENV BUNDLE_PATH="$GEM_HOME" \ + BUNDLE_BIN="$GEM_HOME/bin" \ + BUNDLE_SILENCE_ROOT_WARNING=1 \ + BUNDLE_APP_CONFIG="$GEM_HOME" +ENV PATH $BUNDLE_BIN:$PATH +RUN mkdir -p "$GEM_HOME" "$BUNDLE_BIN" \ + && chmod 777 "$GEM_HOME" "$BUNDLE_BIN" + +CMD [ "irb" ] diff --git a/Dockerfile-alpine.template b/Dockerfile-alpine.template index 53f3d93bf..5e659654f 100644 --- a/Dockerfile-alpine.template +++ b/Dockerfile-alpine.template @@ -43,7 +43,7 @@ RUN set -ex \ yaml-dev \ zlib-dev \ \ - && wget -O ruby.tar.gz "https://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.gz" \ + && wget -O ruby.tar.gz "https://cache.ruby-lang.org/pub/ruby/${RUBY_MAJOR%-rc}/ruby-$RUBY_VERSION.tar.gz" \ && echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.gz" | sha256sum -c - \ \ && mkdir -p /usr/src/ruby \ diff --git a/Dockerfile-slim.template b/Dockerfile-slim.template index a4b2af800..72515f246 100644 --- a/Dockerfile-slim.template +++ b/Dockerfile-slim.template @@ -47,7 +47,7 @@ RUN set -ex \ && apt-get install -y --no-install-recommends $buildDeps \ && rm -rf /var/lib/apt/lists/* \ \ - && wget -O ruby.tar.gz "https://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.gz" \ + && wget -O ruby.tar.gz "https://cache.ruby-lang.org/pub/ruby/${RUBY_MAJOR%-rc}/ruby-$RUBY_VERSION.tar.gz" \ && echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.gz" | sha256sum -c - \ \ && mkdir -p /usr/src/ruby \ diff --git a/Dockerfile.template b/Dockerfile.template index 553225bbf..a73e72ebc 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -25,7 +25,7 @@ RUN set -ex \ && apt-get install -y --no-install-recommends $buildDeps \ && rm -rf /var/lib/apt/lists/* \ \ - && wget -O ruby.tar.gz "https://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.gz" \ + && wget -O ruby.tar.gz "https://cache.ruby-lang.org/pub/ruby/${RUBY_MAJOR%-rc}/ruby-$RUBY_VERSION.tar.gz" \ && echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.gz" | sha256sum -c - \ \ && mkdir -p /usr/src/ruby \ diff --git a/update.sh b/update.sh index 70a1b03f0..e6a8b7898 100755 --- a/update.sh +++ b/update.sh @@ -19,10 +19,16 @@ bundler="$(latest_gem_version bundler)" travisEnv= for version in "${versions[@]}"; do + rcGrepV='-v' + rcVersion="${version%-rc}" + if [ "$rcVersion" != "$version" ]; then + rcGrepV= + fi + IFS=$'\n'; allVersions=( - $(curl -sSL --compressed "https://cache.ruby-lang.org/pub/ruby/$version/" \ - | grep -E '