Skip to content

Commit 1d9905a

Browse files
panbingkunLuciferYang
authored andcommitted
[SPARK-45276][INFRA] Replace Java 8 and Java 11 installed in the Dockerfile with Java
### What changes were proposed in this pull request? The pr aims to replace Java 8 and Java 11 installed in the Dockerfile, include: - dev/create-release/spark-rm/Dockerfile - connector/docker/spark-test/base/Dockerfile ### Why are the changes needed? After SPARK-44112, the minimum supported Java version for Apache Spark 4.0 is Java 17. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Manually test: > 1.dev/create-release/spark-rm/Dockerfile ``` cd dev/create-release/spark-rm docker build -t spark-rm --build-arg UID=$UID . ``` > 2. connector/docker/spark-test/base/Dockerfile ``` cd connector/docker sh build ``` ### Was this patch authored or co-authored using generative AI tooling? No. Closes apache#43076 from panbingkun/SPARK-45293. Authored-by: panbingkun <[email protected]> Signed-off-by: yangjie01 <[email protected]>
1 parent 5c4aef4 commit 1d9905a

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

connector/docker/spark-test/base/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ FROM ubuntu:20.04
2222
# Remove unneeded /var/lib/apt/lists/* after install to reduce the
2323
# docker image size (by ~30MB)
2424
RUN apt-get update && \
25-
apt-get install -y less openjdk-11-jre-headless iproute2 vim-tiny sudo openssh-server && \
25+
apt-get install -y less openjdk-17-jre-headless iproute2 vim-tiny sudo openssh-server && \
2626
rm -rf /var/lib/apt/lists/*
2727

2828
ENV SPARK_HOME /opt/spark

dev/create-release/do-release-docker.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Options are:
4545
-n : dry run mode. Performs checks and local builds, but do not upload anything.
4646
-t [tag] : tag for the spark-rm docker image to use for building (default: "latest").
4747
-j [path] : path to local JDK installation to use for building. By default the script will
48-
use openjdk8 installed in the docker image.
48+
use openjdk17 installed in the docker image.
4949
-s [step] : runs a single step of the process; valid steps are: tag, build, docs, publish, finalize
5050
EOF
5151
}

dev/create-release/spark-rm/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ RUN apt-get clean && apt-get update && $APT_INSTALL gnupg ca-certificates && \
6161
apt-get update && \
6262
$APT_INSTALL software-properties-common && \
6363
apt-get update && \
64-
# Install openjdk 8.
65-
$APT_INSTALL openjdk-8-jdk && \
66-
update-alternatives --set java $(ls /usr/lib/jvm/java-8-openjdk-*/jre/bin/java) && \
64+
# Install openjdk 17.
65+
$APT_INSTALL openjdk-17-jdk && \
66+
update-alternatives --set java $(ls /usr/lib/jvm/java-17-openjdk-*/bin/java) && \
6767
# Install build / source control tools
6868
$APT_INSTALL curl wget git maven ivy subversion make gcc lsof libffi-dev \
6969
pandoc pandoc-citeproc libssl-dev libcurl4-openssl-dev libxml2-dev && \

0 commit comments

Comments
 (0)