Skip to content

Commit f0e6f2d

Browse files
committed
Polish Docker images
1 parent 74679b2 commit f0e6f2d

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

Dockerfile-alpine

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM alpine:3.8 as builder
22

3-
ARG perf_test_version
3+
ARG perf_test_version="2.5.0"
44

55
RUN set -eux; \
66
\
@@ -12,20 +12,23 @@ RUN set -eux; \
1212

1313
# change the JAVA_URL variable below as well
1414
ENV JAVA_VERSION="11.0.2"
15+
# not to be found on Azul website, computed manually
16+
ENV JAVA_SHA256="eba6b1ee7302a7e509a9f28ed4fa2359e29431aed8dcc43b1145a8c8a3847791"
1517

1618
RUN set -eux; \
1719
\
18-
JAVA_URL="https://cdn.azul.com/zulu/bin/zulu11.29.3-ca-jdk11.0.2-linux_musl_x64.tar.gz"; \
20+
JAVA_URL="https://cdn.azul.com/zulu/bin/zulu11.29.3-ca-jdk$JAVA_VERSION-linux_musl_x64.tar.gz"; \
1921
JAVA_PATH="/usr/lib/jdk-$JAVA_VERSION"; \
2022
\
2123
wget --progress dot:giga --output-document "$JAVA_PATH.tar.gz" "$JAVA_URL"; \
24+
echo "$JAVA_SHA256 *$JAVA_PATH.tar.gz" | sha256sum -c -; \
2225
mkdir -p "$JAVA_PATH"; \
2326
tar --extract --file "$JAVA_PATH.tar.gz" --directory "$JAVA_PATH" --strip-components 1; \
2427
$JAVA_PATH/bin/jlink --compress=2 --output /jre --add-modules java.base,java.management,java.xml,java.naming,java.sql; \
2528
/jre/bin/java -version
2629

27-
# Default to a PGP keyserver that pgp-happy-eyeballs recognizes, but allow for substitutions locally
28-
ARG PGP_KEYSERVER=ha.pool.sks-keyservers.net
30+
# pgpkeys.uk is quite reliable, but allow for substitutions locally
31+
ARG PGP_KEYSERVER=pgpkeys.uk
2932
# If you are building this image locally and are getting `gpg: keyserver receive failed: No data` errors,
3033
# run the build with a different PGP_KEYSERVER, e.g. docker build --tag rabbitmq:3.7 --build-arg PGP_KEYSERVER=pgpkeys.eu 3.7/ubuntu
3134
# For context, see https://github.com/docker-library/official-images/issues/4252

Dockerfile-ubuntu

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM ubuntu:18.04 as builder
22

3-
ARG perf_test_version
3+
ARG perf_test_version="2.5.0"
44

55
RUN set -eux; \
66
\
@@ -27,8 +27,8 @@ RUN set -eux; \
2727
$JAVA_PATH/bin/jlink --compress=2 --output /jre --add-modules java.base,java.management,java.xml,java.naming,java.sql; \
2828
/jre/bin/java -version
2929

30-
# Default to a PGP keyserver that pgp-happy-eyeballs recognizes, but allow for substitutions locally
31-
ARG PGP_KEYSERVER=ha.pool.sks-keyservers.net
30+
# pgpkeys.uk is quite reliable, but allow for substitutions locally
31+
ARG PGP_KEYSERVER=pgpkeys.uk
3232
# If you are building this image locally and are getting `gpg: keyserver receive failed: No data` errors,
3333
# run the build with a different PGP_KEYSERVER, e.g. docker build --tag rabbitmq:3.7 --build-arg PGP_KEYSERVER=pgpkeys.eu 3.7/ubuntu
3434
# For context, see https://github.com/docker-library/official-images/issues/4252

0 commit comments

Comments
 (0)