Skip to content

Commit 4a81ad4

Browse files
committed
add JDK17 in docker file
1 parent 4c3c9a5 commit 4a81ad4

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

dev-support/Jenkinsfile_GitHub

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,7 @@ pipeline {
482482
// customized per parallel stage
483483
PLUGINS = "${JDK_SPECIFIC_PLUGINS}"
484484
SET_JAVA_HOME = '/usr/lib/jvm/java-17'
485+
HADOOP_PROFILE = '3.0'
485486
WORKDIR_REL = "${WORKDIR_REL_JDK17_HADOOP3_CHECK}"
486487
// identical for all parallel stages
487488
WORKDIR = "${WORKSPACE}/${WORKDIR_REL}"

dev-support/docker/Dockerfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,13 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"]
110110
RUN 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

Comments
 (0)