Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ruby #10504

Merged
merged 1 commit into from
Jul 8, 2021
Merged

Update ruby #10504

merged 1 commit into from
Jul 8, 2021

Conversation

tianon
Copy link
Member

@tianon tianon commented Jul 8, 2021

Changes:

Changes:

- docker-library/ruby@a1a06ef: Merge pull request docker-library/ruby#349 from infosiftr/jq-template
- docker-library/ruby@0c5948b: Add Alpine 3.14
- docker-library/ruby@761ae37: Add initial jq-based templating engine
@github-actions
Copy link

github-actions bot commented Jul 8, 2021

Diff for c9ed6a5:
diff --git a/_bashbrew-cat b/_bashbrew-cat
index 62b2723..57eb132 100644
--- a/_bashbrew-cat
+++ b/_bashbrew-cat
@@ -1,72 +1,72 @@
 Maintainers: Tianon Gravi <admwiggin@gmail.com> (@tianon), Joseph Ferguson <yosifkit@gmail.com> (@yosifkit)
 GitRepo: https://github.com/docker-library/ruby.git
 
-Tags: 2.6.8-alpine3.12, 2.6-alpine3.12
+Tags: 2.6.8-alpine3.13, 2.6-alpine3.13
 Architectures: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, s390x
-GitCommit: 108e3c2f9cdcfd1a4aeab5169e394b1d738e8c84
-Directory: 2.6/alpine3.12
+GitCommit: 0c5948bcce84b1829a554209c777f0ef6a357dd2
+Directory: 2.6/alpine3.13
 
-Tags: 2.6.8-alpine3.13, 2.6-alpine3.13, 2.6.8-alpine, 2.6-alpine
+Tags: 2.6.8-alpine3.14, 2.6-alpine3.14, 2.6.8-alpine, 2.6-alpine
 Architectures: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, s390x
-GitCommit: 108e3c2f9cdcfd1a4aeab5169e394b1d738e8c84
-Directory: 2.6/alpine3.13
+GitCommit: 0c5948bcce84b1829a554209c777f0ef6a357dd2
+Directory: 2.6/alpine3.14
 
 Tags: 2.6.8-buster, 2.6-buster, 2.6.8, 2.6
 Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, mips64le, ppc64le, s390x
-GitCommit: 108e3c2f9cdcfd1a4aeab5169e394b1d738e8c84
+GitCommit: 761ae37f67acc54d49f085dc4e5a2443a77700e6
 Directory: 2.6/buster
 
 Tags: 2.6.8-slim-buster, 2.6-slim-buster, 2.6.8-slim, 2.6-slim
 Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, mips64le, ppc64le, s390x
-GitCommit: 108e3c2f9cdcfd1a4aeab5169e394b1d738e8c84
-Directory: 2.6/buster/slim
+GitCommit: 0c5948bcce84b1829a554209c777f0ef6a357dd2
+Directory: 2.6/slim-buster
 
 Tags: 2.6.8-slim-stretch, 2.6-slim-stretch
 Architectures: amd64, arm32v5, arm32v7, arm64v8, i386
-GitCommit: 108e3c2f9cdcfd1a4aeab5169e394b1d738e8c84
-Directory: 2.6/stretch/slim
+GitCommit: 0c5948bcce84b1829a554209c777f0ef6a357dd2
+Directory: 2.6/slim-stretch
 
 Tags: 2.6.8-stretch, 2.6-stretch
 Architectures: amd64, arm32v5, arm32v7, arm64v8, i386
-GitCommit: 108e3c2f9cdcfd1a4aeab5169e394b1d738e8c84
+GitCommit: 761ae37f67acc54d49f085dc4e5a2443a77700e6
 Directory: 2.6/stretch
 
-Tags: 2.7.4-alpine3.12, 2.7-alpine3.12, 2-alpine3.12
+Tags: 2.7.4-alpine3.13, 2.7-alpine3.13, 2-alpine3.13
 Architectures: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, s390x
-GitCommit: 9b48d740b4d936bfbffd04f8a7255771cbda0656
-Directory: 2.7/alpine3.12
+GitCommit: 0c5948bcce84b1829a554209c777f0ef6a357dd2
+Directory: 2.7/alpine3.13
 
-Tags: 2.7.4-alpine3.13, 2.7-alpine3.13, 2-alpine3.13, 2.7.4-alpine, 2.7-alpine, 2-alpine
+Tags: 2.7.4-alpine3.14, 2.7-alpine3.14, 2-alpine3.14, 2.7.4-alpine, 2.7-alpine, 2-alpine
 Architectures: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, s390x
-GitCommit: 9b48d740b4d936bfbffd04f8a7255771cbda0656
-Directory: 2.7/alpine3.13
+GitCommit: 0c5948bcce84b1829a554209c777f0ef6a357dd2
+Directory: 2.7/alpine3.14
 
 Tags: 2.7.4-buster, 2.7-buster, 2-buster, 2.7.4, 2.7, 2
 Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, mips64le, ppc64le, s390x
-GitCommit: 9b48d740b4d936bfbffd04f8a7255771cbda0656
+GitCommit: 761ae37f67acc54d49f085dc4e5a2443a77700e6
 Directory: 2.7/buster
 
 Tags: 2.7.4-slim-buster, 2.7-slim-buster, 2-slim-buster, 2.7.4-slim, 2.7-slim, 2-slim
 Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, mips64le, ppc64le, s390x
-GitCommit: 9b48d740b4d936bfbffd04f8a7255771cbda0656
-Directory: 2.7/buster/slim
+GitCommit: 0c5948bcce84b1829a554209c777f0ef6a357dd2
+Directory: 2.7/slim-buster
 
-Tags: 3.0.2-alpine3.12, 3.0-alpine3.12, 3-alpine3.12, alpine3.12
+Tags: 3.0.2-alpine3.13, 3.0-alpine3.13, 3-alpine3.13, alpine3.13
 Architectures: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, s390x
-GitCommit: 5fccac58c3d04a118b65053a0b7d9f9e5df2f68a
-Directory: 3.0/alpine3.12
+GitCommit: 0c5948bcce84b1829a554209c777f0ef6a357dd2
+Directory: 3.0/alpine3.13
 
-Tags: 3.0.2-alpine3.13, 3.0-alpine3.13, 3-alpine3.13, alpine3.13, 3.0.2-alpine, 3.0-alpine, 3-alpine, alpine
+Tags: 3.0.2-alpine3.14, 3.0-alpine3.14, 3-alpine3.14, alpine3.14, 3.0.2-alpine, 3.0-alpine, 3-alpine, alpine
 Architectures: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, s390x
-GitCommit: 5fccac58c3d04a118b65053a0b7d9f9e5df2f68a
-Directory: 3.0/alpine3.13
+GitCommit: 0c5948bcce84b1829a554209c777f0ef6a357dd2
+Directory: 3.0/alpine3.14
 
 Tags: 3.0.2-buster, 3.0-buster, 3-buster, buster, 3.0.2, 3.0, 3, latest
 Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, mips64le, ppc64le, s390x
-GitCommit: 5fccac58c3d04a118b65053a0b7d9f9e5df2f68a
+GitCommit: 761ae37f67acc54d49f085dc4e5a2443a77700e6
 Directory: 3.0/buster
 
 Tags: 3.0.2-slim-buster, 3.0-slim-buster, 3-slim-buster, slim-buster, 3.0.2-slim, 3.0-slim, 3-slim, slim
 Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, mips64le, ppc64le, s390x
-GitCommit: 5fccac58c3d04a118b65053a0b7d9f9e5df2f68a
-Directory: 3.0/buster/slim
+GitCommit: 0c5948bcce84b1829a554209c777f0ef6a357dd2
+Directory: 3.0/slim-buster
diff --git a/_bashbrew-list b/_bashbrew-list
index 342a6fd..5a2c220 100644
--- a/_bashbrew-list
+++ b/_bashbrew-list
@@ -1,14 +1,14 @@
 ruby:2
 ruby:2-alpine
-ruby:2-alpine3.12
 ruby:2-alpine3.13
+ruby:2-alpine3.14
 ruby:2-buster
 ruby:2-slim
 ruby:2-slim-buster
 ruby:2.6
 ruby:2.6-alpine
-ruby:2.6-alpine3.12
 ruby:2.6-alpine3.13
+ruby:2.6-alpine3.14
 ruby:2.6-buster
 ruby:2.6-slim
 ruby:2.6-slim-buster
@@ -16,8 +16,8 @@ ruby:2.6-slim-stretch
 ruby:2.6-stretch
 ruby:2.6.8
 ruby:2.6.8-alpine
-ruby:2.6.8-alpine3.12
 ruby:2.6.8-alpine3.13
+ruby:2.6.8-alpine3.14
 ruby:2.6.8-buster
 ruby:2.6.8-slim
 ruby:2.6.8-slim-buster
@@ -25,42 +25,42 @@ ruby:2.6.8-slim-stretch
 ruby:2.6.8-stretch
 ruby:2.7
 ruby:2.7-alpine
-ruby:2.7-alpine3.12
 ruby:2.7-alpine3.13
+ruby:2.7-alpine3.14
 ruby:2.7-buster
 ruby:2.7-slim
 ruby:2.7-slim-buster
 ruby:2.7.4
 ruby:2.7.4-alpine
-ruby:2.7.4-alpine3.12
 ruby:2.7.4-alpine3.13
+ruby:2.7.4-alpine3.14
 ruby:2.7.4-buster
 ruby:2.7.4-slim
 ruby:2.7.4-slim-buster
 ruby:3
 ruby:3-alpine
-ruby:3-alpine3.12
 ruby:3-alpine3.13
+ruby:3-alpine3.14
 ruby:3-buster
 ruby:3-slim
 ruby:3-slim-buster
 ruby:3.0
 ruby:3.0-alpine
-ruby:3.0-alpine3.12
 ruby:3.0-alpine3.13
+ruby:3.0-alpine3.14
 ruby:3.0-buster
 ruby:3.0-slim
 ruby:3.0-slim-buster
 ruby:3.0.2
 ruby:3.0.2-alpine
-ruby:3.0.2-alpine3.12
 ruby:3.0.2-alpine3.13
+ruby:3.0.2-alpine3.14
 ruby:3.0.2-buster
 ruby:3.0.2-slim
 ruby:3.0.2-slim-buster
 ruby:alpine
-ruby:alpine3.12
 ruby:alpine3.13
+ruby:alpine3.14
 ruby:buster
 ruby:latest
 ruby:slim
diff --git a/ruby_2-alpine/Dockerfile b/ruby_2-alpine/Dockerfile
index f6bdcda..31be848 100644
--- a/ruby_2-alpine/Dockerfile
+++ b/ruby_2-alpine/Dockerfile
@@ -1,7 +1,21 @@
-FROM alpine:3.13
+#
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
+#
+# PLEASE DO NOT EDIT IT DIRECTLY.
+#
 
-RUN apk add --no-cache \
-		gmp-dev
+FROM alpine:3.14
+
+RUN set -eux; \
+	apk add --no-cache \
+		bzip2 \
+		ca-certificates \
+		gmp-dev \
+		libffi-dev \
+		procps \
+		yaml-dev \
+		zlib-dev \
+	;
 
 # skip installing gem documentation
 RUN set -eux; \
@@ -18,9 +32,9 @@ ENV RUBY_DOWNLOAD_SHA256 2a80824e0ad6100826b69b9890bf55cfc4cf2b61a1e1330fccbcb30
 
 # 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 -eux; \
 	\
+# readline-dev vs libedit-dev: https://bugs.ruby-lang.org/issues/11869 and https://github.com/docker-library/ruby/issues/75
 	apk add --no-cache --virtual .ruby-builddeps \
 		autoconf \
 		bison \
@@ -29,6 +43,7 @@ RUN set -eux; \
 		ca-certificates \
 		coreutils \
 		dpkg-dev dpkg \
+		g++ \
 		gcc \
 		gdbm-dev \
 		glib-dev \
@@ -68,6 +83,9 @@ RUN set -eux; \
 	patch -p1 -i thread-stack-fix.patch; \
 	rm thread-stack-fix.patch; \
 	\
+# the configure script does not detect isnan/isinf as macros
+	export ac_cv_func_isnan=yes ac_cv_func_isinf=yes; \
+	\
 # hack in "ENABLE_PATH_CHECK" disabling to suppress:
 #   warning: Insecure world writable dir
 	{ \
@@ -79,8 +97,6 @@ RUN set -eux; \
 	\
 	autoconf; \
 	gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
-# the configure script does not detect isnan/isinf as macros
-	export ac_cv_func_isnan=yes ac_cv_func_isinf=yes; \
 	./configure \
 		--build="$gnuArch" \
 		--disable-install-doc \
@@ -95,24 +111,19 @@ RUN set -eux; \
 			| sort -u \
 			| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
 	)"; \
-	apk add --no-network --virtual .ruby-rundeps \
-		$runDeps \
-		bzip2 \
-		ca-certificates \
-		libffi-dev \
-		procps \
-		yaml-dev \
-		zlib-dev \
-	; \
+	apk add --no-network --virtual .ruby-rundeps $runDeps; \
 	apk del --no-network .ruby-builddeps; \
 	\
 	cd /; \
 	rm -r /usr/src/ruby; \
 # verify we have no "ruby" packages installed
-	! apk --no-network list --installed \
+	if \
+		apk --no-network list --installed \
 			| grep -v '^[.]ruby-rundeps' \
 			| grep -i ruby \
-	; \
+	; then \
+		exit 1; \
+	fi; \
 	[ "$(command -v ruby)" = '/usr/local/bin/ruby' ]; \
 # rough smoke test
 	ruby --version; \
diff --git a/ruby_2-alpine3.12/Dockerfile b/ruby_2-alpine3.13/Dockerfile
similarity index 90%
rename from ruby_2-alpine3.12/Dockerfile
rename to ruby_2-alpine3.13/Dockerfile
index 99be65f..38cc86c 100644
--- a/ruby_2-alpine3.12/Dockerfile
+++ b/ruby_2-alpine3.13/Dockerfile
@@ -1,7 +1,21 @@
-FROM alpine:3.12
+#
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
+#
+# PLEASE DO NOT EDIT IT DIRECTLY.
+#
 
-RUN apk add --no-cache \
-		gmp-dev
+FROM alpine:3.13
+
+RUN set -eux; \
+	apk add --no-cache \
+		bzip2 \
+		ca-certificates \
+		gmp-dev \
+		libffi-dev \
+		procps \
+		yaml-dev \
+		zlib-dev \
+	;
 
 # skip installing gem documentation
 RUN set -eux; \
@@ -18,9 +32,9 @@ ENV RUBY_DOWNLOAD_SHA256 2a80824e0ad6100826b69b9890bf55cfc4cf2b61a1e1330fccbcb30
 
 # 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 -eux; \
 	\
+# readline-dev vs libedit-dev: https://bugs.ruby-lang.org/issues/11869 and https://github.com/docker-library/ruby/issues/75
 	apk add --no-cache --virtual .ruby-builddeps \
 		autoconf \
 		bison \
@@ -29,6 +43,7 @@ RUN set -eux; \
 		ca-certificates \
 		coreutils \
 		dpkg-dev dpkg \
+		g++ \
 		gcc \
 		gdbm-dev \
 		glib-dev \
@@ -68,6 +83,9 @@ RUN set -eux; \
 	patch -p1 -i thread-stack-fix.patch; \
 	rm thread-stack-fix.patch; \
 	\
+# the configure script does not detect isnan/isinf as macros
+	export ac_cv_func_isnan=yes ac_cv_func_isinf=yes; \
+	\
 # hack in "ENABLE_PATH_CHECK" disabling to suppress:
 #   warning: Insecure world writable dir
 	{ \
@@ -79,8 +97,6 @@ RUN set -eux; \
 	\
 	autoconf; \
 	gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
-# the configure script does not detect isnan/isinf as macros
-	export ac_cv_func_isnan=yes ac_cv_func_isinf=yes; \
 	./configure \
 		--build="$gnuArch" \
 		--disable-install-doc \
@@ -95,24 +111,19 @@ RUN set -eux; \
 			| sort -u \
 			| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
 	)"; \
-	apk add --no-network --virtual .ruby-rundeps \
-		$runDeps \
-		bzip2 \
-		ca-certificates \
-		libffi-dev \
-		procps \
-		yaml-dev \
-		zlib-dev \
-	; \
+	apk add --no-network --virtual .ruby-rundeps $runDeps; \
 	apk del --no-network .ruby-builddeps; \
 	\
 	cd /; \
 	rm -r /usr/src/ruby; \
 # verify we have no "ruby" packages installed
-	! apk --no-network list --installed \
+	if \
+		apk --no-network list --installed \
 			| grep -v '^[.]ruby-rundeps' \
 			| grep -i ruby \
-	; \
+	; then \
+		exit 1; \
+	fi; \
 	[ "$(command -v ruby)" = '/usr/local/bin/ruby' ]; \
 # rough smoke test
 	ruby --version; \
diff --git a/ruby_2-slim/Dockerfile b/ruby_2-slim/Dockerfile
index 99edf23..e63c047 100644
--- a/ruby_2-slim/Dockerfile
+++ b/ruby_2-slim/Dockerfile
@@ -1,3 +1,9 @@
+#
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
+#
+# PLEASE DO NOT EDIT IT DIRECTLY.
+#
+
 FROM debian:buster-slim
 
 RUN set -eux; \
@@ -34,22 +40,24 @@ RUN set -eux; \
 	savedAptMark="$(apt-mark showmanual)"; \
 	apt-get update; \
 	apt-get install -y --no-install-recommends \
-		autoconf \
 		bison \
 		dpkg-dev \
+		libgdbm-dev \
+		ruby \
+		autoconf \
+		g++ \
 		gcc \
 		libbz2-dev \
-		libgdbm-compat-dev \
-		libgdbm-dev \
 		libglib2.0-dev \
 		libncurses-dev \
 		libreadline-dev \
 		libxml2-dev \
 		libxslt-dev \
 		make \
-		ruby \
 		wget \
 		xz-utils \
+# https://packages.debian.org/sid/libgdbm-compat-dev (needed for "dbm" core module, but only in Buster+)
+		libgdbm-compat-dev \
 	; \
 	rm -rf /var/lib/apt/lists/*; \
 	\
@@ -86,6 +94,7 @@ RUN set -eux; \
 	find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \
 		| awk '/=>/ { print $(NF-1) }' \
 		| sort -u \
+		| grep -vE '^/usr/local/lib/' \
 		| xargs -r dpkg-query --search \
 		| cut -d: -f1 \
 		| sort -u \
@@ -96,7 +105,7 @@ RUN set -eux; \
 	cd /; \
 	rm -r /usr/src/ruby; \
 # verify we have no "ruby" packages installed
-	! dpkg -l | grep -i ruby; \
+	if dpkg -l | grep -i ruby; then exit 1; fi; \
 	[ "$(command -v ruby)" = '/usr/local/bin/ruby' ]; \
 # rough smoke test
 	ruby --version; \
diff --git a/ruby_2.6-alpine/Dockerfile b/ruby_2.6-alpine/Dockerfile
index f3e13f3..53d1aef 100644
--- a/ruby_2.6-alpine/Dockerfile
+++ b/ruby_2.6-alpine/Dockerfile
@@ -1,7 +1,21 @@
-FROM alpine:3.13
+#
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
+#
+# PLEASE DO NOT EDIT IT DIRECTLY.
+#
 
-RUN apk add --no-cache \
-		gmp-dev
+FROM alpine:3.14
+
+RUN set -eux; \
+	apk add --no-cache \
+		bzip2 \
+		ca-certificates \
+		gmp-dev \
+		libffi-dev \
+		procps \
+		yaml-dev \
+		zlib-dev \
+	;
 
 # skip installing gem documentation
 RUN set -eux; \
@@ -18,9 +32,9 @@ ENV RUBY_DOWNLOAD_SHA256 8262e4663169c85787fdc9bfbd04d9eb86eb2a4b56d7f98373a8fca
 
 # 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 -eux; \
 	\
+# readline-dev vs libedit-dev: https://bugs.ruby-lang.org/issues/11869 and https://github.com/docker-library/ruby/issues/75
 	apk add --no-cache --virtual .ruby-builddeps \
 		autoconf \
 		bison \
@@ -29,6 +43,7 @@ RUN set -eux; \
 		ca-certificates \
 		coreutils \
 		dpkg-dev dpkg \
+		g++ \
 		gcc \
 		gdbm-dev \
 		glib-dev \
@@ -68,6 +83,16 @@ RUN set -eux; \
 	patch -p1 -i thread-stack-fix.patch; \
 	rm thread-stack-fix.patch; \
 	\
+# https://bugs.ruby-lang.org/issues/17723 (building with autoconf 2.70+ fails)
+# https://github.com/ruby/ruby/pull/3773
+	wget -O 'autoconf-2.70.patch' 'https://github.com/ruby/ruby/commit/fcc88da5eb162043adcba552646677d2ab5adf55.patch'; \
+	echo '62eefa55030788d409003eccd945ccc408f02fe0d71616ed1c1bdcaf7a2f8a54 *autoconf-2.70.patch' | sha256sum --check --strict; \
+	patch -p1 -i autoconf-2.70.patch; \
+	rm autoconf-2.70.patch; \
+	\
+# the configure script does not detect isnan/isinf as macros
+	export ac_cv_func_isnan=yes ac_cv_func_isinf=yes; \
+	\
 # hack in "ENABLE_PATH_CHECK" disabling to suppress:
 #   warning: Insecure world writable dir
 	{ \
@@ -79,8 +104,6 @@ RUN set -eux; \
 	\
 	autoconf; \
 	gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
-# the configure script does not detect isnan/isinf as macros
-	export ac_cv_func_isnan=yes ac_cv_func_isinf=yes; \
 	./configure \
 		--build="$gnuArch" \
 		--disable-install-doc \
@@ -95,24 +118,19 @@ RUN set -eux; \
 			| sort -u \
 			| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
 	)"; \
-	apk add --no-network --virtual .ruby-rundeps \
-		$runDeps \
-		bzip2 \
-		ca-certificates \
-		libffi-dev \
-		procps \
-		yaml-dev \
-		zlib-dev \
-	; \
+	apk add --no-network --virtual .ruby-rundeps $runDeps; \
 	apk del --no-network .ruby-builddeps; \
 	\
 	cd /; \
 	rm -r /usr/src/ruby; \
 # verify we have no "ruby" packages installed
-	! apk --no-network list --installed \
+	if \
+		apk --no-network list --installed \
 			| grep -v '^[.]ruby-rundeps' \
 			| grep -i ruby \
-	; \
+	; then \
+		exit 1; \
+	fi; \
 	[ "$(command -v ruby)" = '/usr/local/bin/ruby' ]; \
 # rough smoke test
 	ruby --version; \
diff --git a/ruby_2.6-alpine3.12/Dockerfile b/ruby_2.6-alpine3.13/Dockerfile
similarity index 90%
rename from ruby_2.6-alpine3.12/Dockerfile
rename to ruby_2.6-alpine3.13/Dockerfile
index f6a5902..1c1feaf 100644
--- a/ruby_2.6-alpine3.12/Dockerfile
+++ b/ruby_2.6-alpine3.13/Dockerfile
@@ -1,7 +1,21 @@
-FROM alpine:3.12
+#
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
+#
+# PLEASE DO NOT EDIT IT DIRECTLY.
+#
 
-RUN apk add --no-cache \
-		gmp-dev
+FROM alpine:3.13
+
+RUN set -eux; \
+	apk add --no-cache \
+		bzip2 \
+		ca-certificates \
+		gmp-dev \
+		libffi-dev \
+		procps \
+		yaml-dev \
+		zlib-dev \
+	;
 
 # skip installing gem documentation
 RUN set -eux; \
@@ -18,9 +32,9 @@ ENV RUBY_DOWNLOAD_SHA256 8262e4663169c85787fdc9bfbd04d9eb86eb2a4b56d7f98373a8fca
 
 # 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 -eux; \
 	\
+# readline-dev vs libedit-dev: https://bugs.ruby-lang.org/issues/11869 and https://github.com/docker-library/ruby/issues/75
 	apk add --no-cache --virtual .ruby-builddeps \
 		autoconf \
 		bison \
@@ -29,6 +43,7 @@ RUN set -eux; \
 		ca-certificates \
 		coreutils \
 		dpkg-dev dpkg \
+		g++ \
 		gcc \
 		gdbm-dev \
 		glib-dev \
@@ -68,6 +83,9 @@ RUN set -eux; \
 	patch -p1 -i thread-stack-fix.patch; \
 	rm thread-stack-fix.patch; \
 	\
+# the configure script does not detect isnan/isinf as macros
+	export ac_cv_func_isnan=yes ac_cv_func_isinf=yes; \
+	\
 # hack in "ENABLE_PATH_CHECK" disabling to suppress:
 #   warning: Insecure world writable dir
 	{ \
@@ -79,8 +97,6 @@ RUN set -eux; \
 	\
 	autoconf; \
 	gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
-# the configure script does not detect isnan/isinf as macros
-	export ac_cv_func_isnan=yes ac_cv_func_isinf=yes; \
 	./configure \
 		--build="$gnuArch" \
 		--disable-install-doc \
@@ -95,24 +111,19 @@ RUN set -eux; \
 			| sort -u \
 			| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
 	)"; \
-	apk add --no-network --virtual .ruby-rundeps \
-		$runDeps \
-		bzip2 \
-		ca-certificates \
-		libffi-dev \
-		procps \
-		yaml-dev \
-		zlib-dev \
-	; \
+	apk add --no-network --virtual .ruby-rundeps $runDeps; \
 	apk del --no-network .ruby-builddeps; \
 	\
 	cd /; \
 	rm -r /usr/src/ruby; \
 # verify we have no "ruby" packages installed
-	! apk --no-network list --installed \
+	if \
+		apk --no-network list --installed \
 			| grep -v '^[.]ruby-rundeps' \
 			| grep -i ruby \
-	; \
+	; then \
+		exit 1; \
+	fi; \
 	[ "$(command -v ruby)" = '/usr/local/bin/ruby' ]; \
 # rough smoke test
 	ruby --version; \
diff --git a/ruby_2.6-slim-stretch/Dockerfile b/ruby_2.6-slim-stretch/Dockerfile
index 0142280..88d1609 100644
--- a/ruby_2.6-slim-stretch/Dockerfile
+++ b/ruby_2.6-slim-stretch/Dockerfile
@@ -1,3 +1,9 @@
+#
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
+#
+# PLEASE DO NOT EDIT IT DIRECTLY.
+#
+
 FROM debian:stretch-slim
 
 RUN set -eux; \
@@ -34,19 +40,20 @@ RUN set -eux; \
 	savedAptMark="$(apt-mark showmanual)"; \
 	apt-get update; \
 	apt-get install -y --no-install-recommends \
-		autoconf \
 		bison \
 		dpkg-dev \
+		libgdbm-dev \
+		ruby \
+		autoconf \
+		g++ \
 		gcc \
 		libbz2-dev \
-		libgdbm-dev \
 		libglib2.0-dev \
 		libncurses-dev \
 		libreadline-dev \
 		libxml2-dev \
 		libxslt-dev \
 		make \
-		ruby \
 		wget \
 		xz-utils \
 	; \
@@ -85,6 +92,7 @@ RUN set -eux; \
 	find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \
 		| awk '/=>/ { print $(NF-1) }' \
 		| sort -u \
+		| grep -vE '^/usr/local/lib/' \
 		| xargs -r dpkg-query --search \
 		| cut -d: -f1 \
 		| sort -u \
@@ -95,7 +103,7 @@ RUN set -eux; \
 	cd /; \
 	rm -r /usr/src/ruby; \
 # verify we have no "ruby" packages installed
-	! dpkg -l | grep -i ruby; \
+	if dpkg -l | grep -i ruby; then exit 1; fi; \
 	[ "$(command -v ruby)" = '/usr/local/bin/ruby' ]; \
 # rough smoke test
 	ruby --version; \
diff --git a/ruby_2.6-slim/Dockerfile b/ruby_2.6-slim/Dockerfile
index 3afd6ff..0c3b1a9 100644
--- a/ruby_2.6-slim/Dockerfile
+++ b/ruby_2.6-slim/Dockerfile
@@ -1,3 +1,9 @@
+#
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
+#
+# PLEASE DO NOT EDIT IT DIRECTLY.
+#
+
 FROM debian:buster-slim
 
 RUN set -eux; \
@@ -34,22 +40,24 @@ RUN set -eux; \
 	savedAptMark="$(apt-mark showmanual)"; \
 	apt-get update; \
 	apt-get install -y --no-install-recommends \
-		autoconf \
 		bison \
 		dpkg-dev \
+		libgdbm-dev \
+		ruby \
+		autoconf \
+		g++ \
 		gcc \
 		libbz2-dev \
-		libgdbm-compat-dev \
-		libgdbm-dev \
 		libglib2.0-dev \
 		libncurses-dev \
 		libreadline-dev \
 		libxml2-dev \
 		libxslt-dev \
 		make \
-		ruby \
 		wget \
 		xz-utils \
+# https://packages.debian.org/sid/libgdbm-compat-dev (needed for "dbm" core module, but only in Buster+)
+		libgdbm-compat-dev \
 	; \
 	rm -rf /var/lib/apt/lists/*; \
 	\
@@ -86,6 +94,7 @@ RUN set -eux; \
 	find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \
 		| awk '/=>/ { print $(NF-1) }' \
 		| sort -u \
+		| grep -vE '^/usr/local/lib/' \
 		| xargs -r dpkg-query --search \
 		| cut -d: -f1 \
 		| sort -u \
@@ -96,7 +105,7 @@ RUN set -eux; \
 	cd /; \
 	rm -r /usr/src/ruby; \
 # verify we have no "ruby" packages installed
-	! dpkg -l | grep -i ruby; \
+	if dpkg -l | grep -i ruby; then exit 1; fi; \
 	[ "$(command -v ruby)" = '/usr/local/bin/ruby' ]; \
 # rough smoke test
 	ruby --version; \
diff --git a/ruby_2.6-stretch/Dockerfile b/ruby_2.6-stretch/Dockerfile
index d535bea..73f9cfd 100644
--- a/ruby_2.6-stretch/Dockerfile
+++ b/ruby_2.6-stretch/Dockerfile
@@ -1,3 +1,9 @@
+#
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
+#
+# PLEASE DO NOT EDIT IT DIRECTLY.
+#
+
 FROM buildpack-deps:stretch
 
 # skip installing gem documentation
@@ -60,6 +66,7 @@ RUN set -eux; \
 	find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \
 		| awk '/=>/ { print $(NF-1) }' \
 		| sort -u \
+		| grep -vE '^/usr/local/lib/' \
 		| xargs -r dpkg-query --search \
 		| cut -d: -f1 \
 		| sort -u \
@@ -70,7 +77,7 @@ RUN set -eux; \
 	cd /; \
 	rm -r /usr/src/ruby; \
 # verify we have no "ruby" packages installed
-	! dpkg -l | grep -i ruby; \
+	if dpkg -l | grep -i ruby; then exit 1; fi; \
 	[ "$(command -v ruby)" = '/usr/local/bin/ruby' ]; \
 # rough smoke test
 	ruby --version; \
diff --git a/ruby_2.6/Dockerfile b/ruby_2.6/Dockerfile
index 6fc6427..b9824a2 100644
--- a/ruby_2.6/Dockerfile
+++ b/ruby_2.6/Dockerfile
@@ -1,3 +1,9 @@
+#
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
+#
+# PLEASE DO NOT EDIT IT DIRECTLY.
+#
+
 FROM buildpack-deps:buster
 
 # skip installing gem documentation
@@ -60,6 +66,7 @@ RUN set -eux; \
 	find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \
 		| awk '/=>/ { print $(NF-1) }' \
 		| sort -u \
+		| grep -vE '^/usr/local/lib/' \
 		| xargs -r dpkg-query --search \
 		| cut -d: -f1 \
 		| sort -u \
@@ -70,7 +77,7 @@ RUN set -eux; \
 	cd /; \
 	rm -r /usr/src/ruby; \
 # verify we have no "ruby" packages installed
-	! dpkg -l | grep -i ruby; \
+	if dpkg -l | grep -i ruby; then exit 1; fi; \
 	[ "$(command -v ruby)" = '/usr/local/bin/ruby' ]; \
 # rough smoke test
 	ruby --version; \
diff --git a/ruby_2/Dockerfile b/ruby_2/Dockerfile
index f23ce77..f378063 100644
--- a/ruby_2/Dockerfile
+++ b/ruby_2/Dockerfile
@@ -1,3 +1,9 @@
+#
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
+#
+# PLEASE DO NOT EDIT IT DIRECTLY.
+#
+
 FROM buildpack-deps:buster
 
 # skip installing gem documentation
@@ -60,6 +66,7 @@ RUN set -eux; \
 	find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \
 		| awk '/=>/ { print $(NF-1) }' \
 		| sort -u \
+		| grep -vE '^/usr/local/lib/' \
 		| xargs -r dpkg-query --search \
 		| cut -d: -f1 \
 		| sort -u \
@@ -70,7 +77,7 @@ RUN set -eux; \
 	cd /; \
 	rm -r /usr/src/ruby; \
 # verify we have no "ruby" packages installed
-	! dpkg -l | grep -i ruby; \
+	if dpkg -l | grep -i ruby; then exit 1; fi; \
 	[ "$(command -v ruby)" = '/usr/local/bin/ruby' ]; \
 # rough smoke test
 	ruby --version; \
diff --git a/ruby_alpine/Dockerfile b/ruby_alpine/Dockerfile
index 1f004c4..e574b85 100644
--- a/ruby_alpine/Dockerfile
+++ b/ruby_alpine/Dockerfile
@@ -1,7 +1,21 @@
-FROM alpine:3.13
+#
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
+#
+# PLEASE DO NOT EDIT IT DIRECTLY.
+#
 
-RUN apk add --no-cache \
-		gmp-dev
+FROM alpine:3.14
+
+RUN set -eux; \
+	apk add --no-cache \
+		bzip2 \
+		ca-certificates \
+		gmp-dev \
+		libffi-dev \
+		procps \
+		yaml-dev \
+		zlib-dev \
+	;
 
 # skip installing gem documentation
 RUN set -eux; \
@@ -18,9 +32,9 @@ ENV RUBY_DOWNLOAD_SHA256 570e7773100f625599575f363831166d91d49a1ab97d3ab6495af44
 
 # 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 -eux; \
 	\
+# readline-dev vs libedit-dev: https://bugs.ruby-lang.org/issues/11869 and https://github.com/docker-library/ruby/issues/75
 	apk add --no-cache --virtual .ruby-builddeps \
 		autoconf \
 		bison \
@@ -29,6 +43,7 @@ RUN set -eux; \
 		ca-certificates \
 		coreutils \
 		dpkg-dev dpkg \
+		g++ \
 		gcc \
 		gdbm-dev \
 		glib-dev \
@@ -68,6 +83,9 @@ RUN set -eux; \
 	patch -p1 -i thread-stack-fix.patch; \
 	rm thread-stack-fix.patch; \
 	\
+# the configure script does not detect isnan/isinf as macros
+	export ac_cv_func_isnan=yes ac_cv_func_isinf=yes; \
+	\
 # hack in "ENABLE_PATH_CHECK" disabling to suppress:
 #   warning: Insecure world writable dir
 	{ \
@@ -79,8 +97,6 @@ RUN set -eux; \
 	\
 	autoconf; \
 	gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
-# the configure script does not detect isnan/isinf as macros
-	export ac_cv_func_isnan=yes ac_cv_func_isinf=yes; \
 	./configure \
 		--build="$gnuArch" \
 		--disable-install-doc \
@@ -95,24 +111,19 @@ RUN set -eux; \
 			| sort -u \
 			| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
 	)"; \
-	apk add --no-network --virtual .ruby-rundeps \
-		$runDeps \
-		bzip2 \
-		ca-certificates \
-		libffi-dev \
-		procps \
-		yaml-dev \
-		zlib-dev \
-	; \
+	apk add --no-network --virtual .ruby-rundeps $runDeps; \
 	apk del --no-network .ruby-builddeps; \
 	\
 	cd /; \
 	rm -r /usr/src/ruby; \
 # verify we have no "ruby" packages installed
-	! apk --no-network list --installed \
+	if \
+		apk --no-network list --installed \
 			| grep -v '^[.]ruby-rundeps' \
 			| grep -i ruby \
-	; \
+	; then \
+		exit 1; \
+	fi; \
 	[ "$(command -v ruby)" = '/usr/local/bin/ruby' ]; \
 # rough smoke test
 	ruby --version; \
diff --git a/ruby_alpine3.12/Dockerfile b/ruby_alpine3.13/Dockerfile
similarity index 90%
rename from ruby_alpine3.12/Dockerfile
rename to ruby_alpine3.13/Dockerfile
index 52ccc65..ba573d2 100644
--- a/ruby_alpine3.12/Dockerfile
+++ b/ruby_alpine3.13/Dockerfile
@@ -1,7 +1,21 @@
-FROM alpine:3.12
+#
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
+#
+# PLEASE DO NOT EDIT IT DIRECTLY.
+#
 
-RUN apk add --no-cache \
-		gmp-dev
+FROM alpine:3.13
+
+RUN set -eux; \
+	apk add --no-cache \
+		bzip2 \
+		ca-certificates \
+		gmp-dev \
+		libffi-dev \
+		procps \
+		yaml-dev \
+		zlib-dev \
+	;
 
 # skip installing gem documentation
 RUN set -eux; \
@@ -18,9 +32,9 @@ ENV RUBY_DOWNLOAD_SHA256 570e7773100f625599575f363831166d91d49a1ab97d3ab6495af44
 
 # 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 -eux; \
 	\
+# readline-dev vs libedit-dev: https://bugs.ruby-lang.org/issues/11869 and https://github.com/docker-library/ruby/issues/75
 	apk add --no-cache --virtual .ruby-builddeps \
 		autoconf \
 		bison \
@@ -29,6 +43,7 @@ RUN set -eux; \
 		ca-certificates \
 		coreutils \
 		dpkg-dev dpkg \
+		g++ \
 		gcc \
 		gdbm-dev \
 		glib-dev \
@@ -68,6 +83,9 @@ RUN set -eux; \
 	patch -p1 -i thread-stack-fix.patch; \
 	rm thread-stack-fix.patch; \
 	\
+# the configure script does not detect isnan/isinf as macros
+	export ac_cv_func_isnan=yes ac_cv_func_isinf=yes; \
+	\
 # hack in "ENABLE_PATH_CHECK" disabling to suppress:
 #   warning: Insecure world writable dir
 	{ \
@@ -79,8 +97,6 @@ RUN set -eux; \
 	\
 	autoconf; \
 	gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
-# the configure script does not detect isnan/isinf as macros
-	export ac_cv_func_isnan=yes ac_cv_func_isinf=yes; \
 	./configure \
 		--build="$gnuArch" \
 		--disable-install-doc \
@@ -95,24 +111,19 @@ RUN set -eux; \
 			| sort -u \
 			| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
 	)"; \
-	apk add --no-network --virtual .ruby-rundeps \
-		$runDeps \
-		bzip2 \
-		ca-certificates \
-		libffi-dev \
-		procps \
-		yaml-dev \
-		zlib-dev \
-	; \
+	apk add --no-network --virtual .ruby-rundeps $runDeps; \
 	apk del --no-network .ruby-builddeps; \
 	\
 	cd /; \
 	rm -r /usr/src/ruby; \
 # verify we have no "ruby" packages installed
-	! apk --no-network list --installed \
+	if \
+		apk --no-network list --installed \
 			| grep -v '^[.]ruby-rundeps' \
 			| grep -i ruby \
-	; \
+	; then \
+		exit 1; \
+	fi; \
 	[ "$(command -v ruby)" = '/usr/local/bin/ruby' ]; \
 # rough smoke test
 	ruby --version; \
diff --git a/ruby_latest/Dockerfile b/ruby_latest/Dockerfile
index 953b845..fe137bc 100644
--- a/ruby_latest/Dockerfile
+++ b/ruby_latest/Dockerfile
@@ -1,3 +1,9 @@
+#
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
+#
+# PLEASE DO NOT EDIT IT DIRECTLY.
+#
+
 FROM buildpack-deps:buster
 
 # skip installing gem documentation
@@ -60,6 +66,7 @@ RUN set -eux; \
 	find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \
 		| awk '/=>/ { print $(NF-1) }' \
 		| sort -u \
+		| grep -vE '^/usr/local/lib/' \
 		| xargs -r dpkg-query --search \
 		| cut -d: -f1 \
 		| sort -u \
@@ -70,7 +77,7 @@ RUN set -eux; \
 	cd /; \
 	rm -r /usr/src/ruby; \
 # verify we have no "ruby" packages installed
-	! dpkg -l | grep -i ruby; \
+	if dpkg -l | grep -i ruby; then exit 1; fi; \
 	[ "$(command -v ruby)" = '/usr/local/bin/ruby' ]; \
 # rough smoke test
 	ruby --version; \
diff --git a/ruby_slim/Dockerfile b/ruby_slim/Dockerfile
index a63dc22..88b4e02 100644
--- a/ruby_slim/Dockerfile
+++ b/ruby_slim/Dockerfile
@@ -1,3 +1,9 @@
+#
+# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
+#
+# PLEASE DO NOT EDIT IT DIRECTLY.
+#
+
 FROM debian:buster-slim
 
 RUN set -eux; \
@@ -34,22 +40,24 @@ RUN set -eux; \
 	savedAptMark="$(apt-mark showmanual)"; \
 	apt-get update; \
 	apt-get install -y --no-install-recommends \
-		autoconf \
 		bison \
 		dpkg-dev \
+		libgdbm-dev \
+		ruby \
+		autoconf \
+		g++ \
 		gcc \
 		libbz2-dev \
-		libgdbm-compat-dev \
-		libgdbm-dev \
 		libglib2.0-dev \
 		libncurses-dev \
 		libreadline-dev \
 		libxml2-dev \
 		libxslt-dev \
 		make \
-		ruby \
 		wget \
 		xz-utils \
+# https://packages.debian.org/sid/libgdbm-compat-dev (needed for "dbm" core module, but only in Buster+)
+		libgdbm-compat-dev \
 	; \
 	rm -rf /var/lib/apt/lists/*; \
 	\
@@ -86,6 +94,7 @@ RUN set -eux; \
 	find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \
 		| awk '/=>/ { print $(NF-1) }' \
 		| sort -u \
+		| grep -vE '^/usr/local/lib/' \
 		| xargs -r dpkg-query --search \
 		| cut -d: -f1 \
 		| sort -u \
@@ -96,7 +105,7 @@ RUN set -eux; \
 	cd /; \
 	rm -r /usr/src/ruby; \
 # verify we have no "ruby" packages installed
-	! dpkg -l | grep -i ruby; \
+	if dpkg -l | grep -i ruby; then exit 1; fi; \
 	[ "$(command -v ruby)" = '/usr/local/bin/ruby' ]; \
 # rough smoke test
 	ruby --version; \

@yosifkit yosifkit merged commit 3b13c6f into docker-library:master Jul 8, 2021
@yosifkit yosifkit deleted the ruby branch July 8, 2021 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants