Skip to content

Commit 30a5123

Browse files
authored
Update Dockerfile (#1501)
1 parent e3d1080 commit 30a5123

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

testkit/Dockerfile

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,11 @@ RUN apt-get update && apt-get install -y \
88
curl \
99
apt-transport-https \
1010
python3 \
11+
p11-kit \
1112
&& rm -rf /var/lib/apt/lists/*
1213

13-
# https://adoptium.net/en-GB/installation/linux
14-
RUN mkdir -p /etc/apt/keyrings \
15-
&& curl --location --silent --show-error https://packages.adoptium.net/artifactory/api/gpg/key/public -o /etc/apt/keyrings/adoptium.asc \
16-
&& echo "deb [signed-by=/etc/apt/keyrings/adoptium.asc] https://packages.adoptium.net/artifactory/deb $(awk -F= '/^VERSION_CODENAME/{print$2}' /etc/os-release) main" | tee /etc/apt/sources.list.d/adoptium.list > /dev/null \
17-
&& apt-get update && apt-get install -y \
18-
temurin-17-jdk \
19-
&& rm -rf /var/lib/apt/lists/* \
20-
&& ln -s /usr/lib/jvm/temurin-17-jdk-* $JAVA_HOME
14+
# https://hub.docker.com/_/eclipse-temurin
15+
COPY --from=eclipse-temurin:17-jdk /opt/java/openjdk $JAVA_HOME
2116

2217
COPY --from=maven:3.9.2-eclipse-temurin-17 /usr/share/maven /opt/apache-maven
2318

@@ -26,7 +21,12 @@ COPY --from=maven:3.9.2-eclipse-temurin-17 /usr/share/maven /opt/apache-maven
2621
# JAVA_HOME needed by update-ca-certificates hook to update Java with changed system CAs.
2722
COPY CAs/* /usr/local/share/ca-certificates/
2823
COPY CustomCAs/* /usr/local/share/custom-ca-certificates/
29-
RUN echo 'jdk.tls.disabledAlgorithms=jdk.tls.disabledAlgorithms=SSLv3, TLSv1, RC4, DES, MD5withRSA, DH keySize < 1024, EC keySize < 224, 3DES_EDE_CBC, anon, NULL' > /testkit.java.security \
30-
&& update-ca-certificates
24+
RUN echo 'jdk.tls.disabledAlgorithms=jdk.tls.disabledAlgorithms=SSLv3, TLSv1, RC4, DES, MD5withRSA, DH keySize < 1024, EC keySize < 224, 3DES_EDE_CBC, anon, NULL' > /testkit.java.security
25+
26+
# https://github.com/adoptium/containers/issues/293
27+
# https://github.com/adoptium/containers/pull/392
28+
# https://github.com/adoptium/containers/blob/f6d4923380ecb1ec4b0d58c633ebb0aeed4c8332/17/jdk/ubuntu/jammy/entrypoint.sh#L23
29+
RUN update-ca-certificates \
30+
&& trust extract --overwrite --format=java-cacerts --filter=ca-anchors --purpose=server-auth "$JAVA_HOME/lib/security/cacerts"
3131

3232
ENV PATH=$JAVA_HOME/bin:/opt/apache-maven/bin:$PATH

0 commit comments

Comments
 (0)