From d1bac1f66845db4e497e68c4278bcccb025dc7e6 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Tue, 5 Feb 2019 15:41:36 -0800 Subject: [PATCH 1/3] Add "gpgconf --kill all" (and pgp-happy-eyeballs in CI) to help cut down on general GPG keyserver flakiness --- .travis.yml | 1 + 9.2-jre8/Dockerfile | 1 + 9.3-jre8/Dockerfile | 1 + 9.4-jre8/Dockerfile | 1 + 4 files changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index 0a4c388..881454b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,6 +16,7 @@ install: before_script: - env | sort + - wget -qO- 'https://github.com/tianon/pgp-happy-eyeballs/raw/master/hack-my-builds.sh' | bash - cd "${VERSION}${VARIANT:+/$VARIANT}" - image="jetty:${VERSION}${VARIANT:+-$VARIANT}" diff --git a/9.2-jre8/Dockerfile b/9.2-jre8/Dockerfile index a9a67e9..a091242 100644 --- a/9.2-jre8/Dockerfile +++ b/9.2-jre8/Dockerfile @@ -37,6 +37,7 @@ RUN set -xe \ && for key in $JETTY_GPG_KEYS; do \ gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; done \ && gpg --batch --verify jetty.tar.gz.asc jetty.tar.gz \ + && gpgconf --kill all \ && rm -rf "$GNUPGHOME" \ && tar -xvf jetty.tar.gz --strip-components=1 \ && sed -i '/jetty-logging/d' etc/jetty.conf \ diff --git a/9.3-jre8/Dockerfile b/9.3-jre8/Dockerfile index b1d2861..f973026 100644 --- a/9.3-jre8/Dockerfile +++ b/9.3-jre8/Dockerfile @@ -37,6 +37,7 @@ RUN set -xe \ && for key in $JETTY_GPG_KEYS; do \ gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; done \ && gpg --batch --verify jetty.tar.gz.asc jetty.tar.gz \ + && gpgconf --kill all \ && rm -rf "$GNUPGHOME" \ && tar -xvf jetty.tar.gz --strip-components=1 \ && sed -i '/jetty-logging/d' etc/jetty.conf \ diff --git a/9.4-jre8/Dockerfile b/9.4-jre8/Dockerfile index f105bb6..88976bd 100644 --- a/9.4-jre8/Dockerfile +++ b/9.4-jre8/Dockerfile @@ -37,6 +37,7 @@ RUN set -xe \ && for key in $JETTY_GPG_KEYS; do \ gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; done \ && gpg --batch --verify jetty.tar.gz.asc jetty.tar.gz \ + && gpgconf --kill all \ && rm -rf "$GNUPGHOME" \ && tar -xvf jetty.tar.gz --strip-components=1 \ && sed -i '/jetty-logging/d' etc/jetty.conf \ From d8d81a817fc1d60111f2ff65eb5afbb7873e976c Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Tue, 5 Feb 2019 15:43:12 -0800 Subject: [PATCH 2/3] Add "--batch" to all "gpg" invocations See also https://bugs.debian.org/913614 and PRs linked from https://github.com/docker-library/busybox/pull/55. --- 9.2-jre7/Dockerfile | 2 +- 9.2-jre8/Dockerfile | 2 +- 9.3-jre8/Dockerfile | 2 +- 9.4-jre8/Dockerfile | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/9.2-jre7/Dockerfile b/9.2-jre7/Dockerfile index c28d83b..8a88cd2 100644 --- a/9.2-jre7/Dockerfile +++ b/9.2-jre7/Dockerfile @@ -35,7 +35,7 @@ RUN set -xe \ && curl -SL "$JETTY_TGZ_URL.asc" -o jetty.tar.gz.asc \ && export GNUPGHOME="$(mktemp -d)" \ && for key in $JETTY_GPG_KEYS; do \ - gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; done \ + gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; done \ && gpg --batch --verify jetty.tar.gz.asc jetty.tar.gz \ && rm -rf "$GNUPGHOME" \ && tar -xvf jetty.tar.gz --strip-components=1 \ diff --git a/9.2-jre8/Dockerfile b/9.2-jre8/Dockerfile index a091242..33e996a 100644 --- a/9.2-jre8/Dockerfile +++ b/9.2-jre8/Dockerfile @@ -35,7 +35,7 @@ RUN set -xe \ && curl -SL "$JETTY_TGZ_URL.asc" -o jetty.tar.gz.asc \ && export GNUPGHOME="$(mktemp -d)" \ && for key in $JETTY_GPG_KEYS; do \ - gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; done \ + gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; done \ && gpg --batch --verify jetty.tar.gz.asc jetty.tar.gz \ && gpgconf --kill all \ && rm -rf "$GNUPGHOME" \ diff --git a/9.3-jre8/Dockerfile b/9.3-jre8/Dockerfile index f973026..e0f47e9 100644 --- a/9.3-jre8/Dockerfile +++ b/9.3-jre8/Dockerfile @@ -35,7 +35,7 @@ RUN set -xe \ && curl -SL "$JETTY_TGZ_URL.asc" -o jetty.tar.gz.asc \ && export GNUPGHOME="$(mktemp -d)" \ && for key in $JETTY_GPG_KEYS; do \ - gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; done \ + gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; done \ && gpg --batch --verify jetty.tar.gz.asc jetty.tar.gz \ && gpgconf --kill all \ && rm -rf "$GNUPGHOME" \ diff --git a/9.4-jre8/Dockerfile b/9.4-jre8/Dockerfile index 88976bd..e5cdfda 100644 --- a/9.4-jre8/Dockerfile +++ b/9.4-jre8/Dockerfile @@ -35,7 +35,7 @@ RUN set -xe \ && curl -SL "$JETTY_TGZ_URL.asc" -o jetty.tar.gz.asc \ && export GNUPGHOME="$(mktemp -d)" \ && for key in $JETTY_GPG_KEYS; do \ - gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; done \ + gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; done \ && gpg --batch --verify jetty.tar.gz.asc jetty.tar.gz \ && gpgconf --kill all \ && rm -rf "$GNUPGHOME" \ From 8b52914e1aa73caa1807870039b8436e53fba1bf Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Tue, 5 Feb 2019 15:48:04 -0800 Subject: [PATCH 3/3] Update Alpine variants as well --- 9.3-jre8/alpine/Dockerfile | 7 ++++--- 9.4-jre8/alpine/Dockerfile | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/9.3-jre8/alpine/Dockerfile b/9.3-jre8/alpine/Dockerfile index 82733ab..365d191 100644 --- a/9.3-jre8/alpine/Dockerfile +++ b/9.3-jre8/alpine/Dockerfile @@ -33,13 +33,14 @@ ENV JETTY_GPG_KEYS \ RUN set -xe \ # Install required packages for build time. Will be removed when build finishes. && apk add --no-cache --virtual .build-deps gnupg curl \ - + \ && curl -SL "$JETTY_TGZ_URL" -o jetty.tar.gz \ && curl -SL "$JETTY_TGZ_URL.asc" -o jetty.tar.gz.asc \ && export GNUPGHOME="$(mktemp -d)" \ && for key in $JETTY_GPG_KEYS; do \ - gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; done \ + gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; done \ && gpg --batch --verify jetty.tar.gz.asc jetty.tar.gz \ + && gpgconf --kill all \ && rm -rf "$GNUPGHOME" \ && tar -xvzf jetty.tar.gz \ && mv jetty-distribution-$JETTY_VERSION/* ./ \ @@ -47,7 +48,7 @@ RUN set -xe \ && rm -fr demo-base javadoc \ && rm jetty.tar.gz* \ && rm -fr jetty-distribution-$JETTY_VERSION/ \ - + \ # Remove installed packages and various cleanup && apk del .build-deps \ && rm -fr .build-deps \ diff --git a/9.4-jre8/alpine/Dockerfile b/9.4-jre8/alpine/Dockerfile index ae49a6f..7684174 100644 --- a/9.4-jre8/alpine/Dockerfile +++ b/9.4-jre8/alpine/Dockerfile @@ -33,20 +33,21 @@ ENV JETTY_GPG_KEYS \ RUN set -xe \ # Install required packages for build time. Will be removed when build finishes. && apk add --no-cache --virtual .build-deps gnupg curl \ - + \ && curl -SL "$JETTY_TGZ_URL" -o jetty.tar.gz \ && curl -SL "$JETTY_TGZ_URL.asc" -o jetty.tar.gz.asc \ && export GNUPGHOME="$(mktemp -d)" \ && for key in $JETTY_GPG_KEYS; do \ - gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; done \ + gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; done \ && gpg --batch --verify jetty.tar.gz.asc jetty.tar.gz \ + && gpgconf --kill all \ && rm -rf "$GNUPGHOME" \ && tar -xvzf jetty.tar.gz \ && mv jetty-home-$JETTY_VERSION/* ./ \ && sed -i '/jetty-logging/d' etc/jetty.conf \ && rm jetty.tar.gz* \ && rm -fr jetty-home-$JETTY_VERSION/ \ - + \ # Remove installed packages and various cleanup && apk del .build-deps \ && rm -fr .build-deps \