@@ -110,6 +110,13 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"]
110110RUN curl --location --fail --silent --show-error --output /tmp/adoptopenjdk11.tar.gz "${OPENJDK11_URL}" && \
111111 echo "${OPENJDK11_SHA256} */tmp/adoptopenjdk11.tar.gz" | sha256sum -c -
112112
113+ FROM base_image AS openjdk17_download_image
114+ ENV OPENJDK17_URL 'https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.10%2B7/OpenJDK17U-jdk_x64_linux_hotspot_17.0.10_7.tar.gz'
115+ ENV OPENJDK17_SHA256 'a8fd07e1e97352e97e330beb20f1c6b351ba064ca7878e974c7d68b8a5c1b378'
116+ SHELL ["/bin/bash" , "-o" , "pipefail" , "-c" ]
117+ RUN curl --location --fail --silent --show-error --output /tmp/adoptopenjdk17.tar.gz "${OPENJDK17_URL}" && \
118+ echo "${OPENJDK17_SHA256} */tmp/adoptopenjdk17.tar.gz" | sha256sum -c -
119+
113120# #
114121# build the final image
115122#
@@ -158,6 +165,14 @@ RUN mkdir -p /usr/lib/jvm && \
158165 ln -s /usr/lib/jvm/java-11-adoptopenjdk /usr/lib/jvm/java-11 && \
159166 rm /tmp/adoptopenjdk11.tar.gz
160167
168+ # hadolint ignore=DL3010
169+ COPY --from=openjdk17_download_image /tmp/adoptopenjdk17.tar.gz /tmp/adoptopenjdk17.tar.gz
170+ RUN mkdir -p /usr/lib/jvm && \
171+ tar xzf /tmp/adoptopenjdk17.tar.gz -C /usr/lib/jvm && \
172+ ln -s "/usr/lib/jvm/$(basename " $(tar -tf /tmp/adoptopenjdk17.tar.gz | head -n1)")" /usr/lib/jvm/java-17-adoptopenjdk && \
173+ ln -s /usr/lib/jvm/java-17-adoptopenjdk /usr/lib/jvm/java-17 && \
174+ rm /tmp/adoptopenjdk17.tar.gz
175+
161176# configure default environment for Yetus. Yetus in dockermode seems to require
162177# these values to be specified here; the various --foo-path flags do not
163178# propigate as expected, while these are honored.
0 commit comments