Skip to content

Commit ef62070

Browse files
committed
Update Dockerfile (neo4j#1501)
1 parent ff5a3fe commit ef62070

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
# https://maven.apache.org/download.cgi
2318
RUN curl --location --output /tmp/download.tar.gz --silent --show-error https://downloads.apache.org/maven/maven-3/3.9.1/binaries/apache-maven-3.9.1-bin.tar.gz \
@@ -32,7 +27,12 @@ RUN curl --location --output /tmp/download.tar.gz --silent --show-error https://
3227
# JAVA_HOME needed by update-ca-certificates hook to update Java with changed system CAs.
3328
COPY CAs/* /usr/local/share/ca-certificates/
3429
COPY CustomCAs/* /usr/local/share/custom-ca-certificates/
35-
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 \
36-
&& update-ca-certificates
30+
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
31+
32+
# https://github.com/adoptium/containers/issues/293
33+
# https://github.com/adoptium/containers/pull/392
34+
# https://github.com/adoptium/containers/blob/f6d4923380ecb1ec4b0d58c633ebb0aeed4c8332/17/jdk/ubuntu/jammy/entrypoint.sh#L23
35+
RUN update-ca-certificates \
36+
&& trust extract --overwrite --format=java-cacerts --filter=ca-anchors --purpose=server-auth "$JAVA_HOME/lib/security/cacerts"
3737

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

0 commit comments

Comments
 (0)