This is an automated email from the ASF dual-hosted git repository.
dongjoon-hyun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark-docker.git
The following commit(s) were added to refs/heads/master by this push:
new d3a6a39 [SPARK-57291] Support Java 25 in `add-dockerfiles.sh` for
Spark 4.2+
d3a6a39 is described below
commit d3a6a39826e5f348194f6ad56718d363cfbfdb06
Author: Dongjoon Hyun <[email protected]>
AuthorDate: Fri Jun 5 22:32:14 2026 -0700
[SPARK-57291] Support Java 25 in `add-dockerfiles.sh` for Spark 4.2+
### What changes were proposed in this pull request?
This PR aims to support `Java 25` in `add-dockerfiles.sh` for Spark 4.2+
### Why are the changes needed?
Apache Spark 4.2.0 starts to support Java 25 via SPARK-51167.
### Does this PR introduce _any_ user-facing change?
No behavior change because this introduces a new set of docker images only.
### How was this patch tested?
Manually.
**BEFORE**
```
$ ./add-dockerfiles.sh 4.2.0
$ ls -al 4.2.0
total 0
drwxr-xr-x 10 dongjoon staff 320 Jun 5 22:22 .
drwxr-xr-x 40 dongjoon staff 1280 Jun 5 22:21 ..
drwxr-xr-x 3 dongjoon staff 96 Jun 5 22:21
scala2.13-java17-python3-r-ubuntu
drwxr-xr-x 3 dongjoon staff 96 Jun 5 22:21
scala2.13-java17-python3-ubuntu
drwxr-xr-x 3 dongjoon staff 96 Jun 5 22:21 scala2.13-java17-r-ubuntu
drwxr-xr-x 4 dongjoon staff 128 Jun 5 22:21 scala2.13-java17-ubuntu
drwxr-xr-x 3 dongjoon staff 96 Jun 5 22:21
scala2.13-java21-python3-r-ubuntu
drwxr-xr-x 3 dongjoon staff 96 Jun 5 22:21
scala2.13-java21-python3-ubuntu
drwxr-xr-x 3 dongjoon staff 96 Jun 5 22:21 scala2.13-java21-r-ubuntu
drwxr-xr-x 4 dongjoon staff 128 Jun 5 22:22 scala2.13-java21-ubuntu
```
**AFTER**
```
$ ./add-dockerfiles.sh 4.2.0
$ ls -al 4.2.0
total 0
drwxr-xr-x 14 dongjoon staff 448 Jun 5 22:21 .
drwxr-xr-x 40 dongjoon staff 1280 Jun 5 22:21 ..
drwxr-xr-x 3 dongjoon staff 96 Jun 5 22:21
scala2.13-java17-python3-r-ubuntu
drwxr-xr-x 3 dongjoon staff 96 Jun 5 22:21
scala2.13-java17-python3-ubuntu
drwxr-xr-x 3 dongjoon staff 96 Jun 5 22:21 scala2.13-java17-r-ubuntu
drwxr-xr-x 4 dongjoon staff 128 Jun 5 22:21 scala2.13-java17-ubuntu
drwxr-xr-x 3 dongjoon staff 96 Jun 5 22:21
scala2.13-java21-python3-r-ubuntu
drwxr-xr-x 3 dongjoon staff 96 Jun 5 22:21
scala2.13-java21-python3-ubuntu
drwxr-xr-x 3 dongjoon staff 96 Jun 5 22:21 scala2.13-java21-r-ubuntu
drwxr-xr-x 4 dongjoon staff 128 Jun 5 22:21 scala2.13-java21-ubuntu
drwxr-xr-x 3 dongjoon staff 96 Jun 5 22:21
scala2.13-java25-python3-r-ubuntu
drwxr-xr-x 3 dongjoon staff 96 Jun 5 22:21
scala2.13-java25-python3-ubuntu
drwxr-xr-x 3 dongjoon staff 96 Jun 5 22:21 scala2.13-java25-r-ubuntu
drwxr-xr-x 4 dongjoon staff 128 Jun 5 22:21 scala2.13-java25-ubuntu
```
### Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Claude Opus 4.8)
Closes #120 from dongjoon-hyun/SPARK-57291.
Authored-by: Dongjoon Hyun <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
---
add-dockerfiles.sh | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/add-dockerfiles.sh b/add-dockerfiles.sh
index f5924bc..96cd6ee 100755
--- a/add-dockerfiles.sh
+++ b/add-dockerfiles.sh
@@ -40,6 +40,15 @@ if echo $VERSION | grep -Eq "^4."; then
scala2.13-java21-r-ubuntu
scala2.13-java21-ubuntu
"
+ # Java 25 is added since Spark 4.2.0
+ if [ "$(echo $VERSION | cut -d. -f2)" -ge 2 ]; then
+ TAGS+="
+ scala2.13-java25-python3-r-ubuntu
+ scala2.13-java25-python3-ubuntu
+ scala2.13-java25-r-ubuntu
+ scala2.13-java25-ubuntu
+ "
+ fi
elif echo $VERSION | grep -Eq "^3."; then
# 3.x default
TAGS="
@@ -70,7 +79,9 @@ for TAG in $TAGS; do
OPTS+=" --scala-version 2.13"
fi
- if echo $TAG | grep -q "java21"; then
+ if echo $TAG | grep -q "java25"; then
+ OPTS+=" --java-version 25 --image eclipse-temurin:25-jammy"
+ elif echo $TAG | grep -q "java21"; then
OPTS+=" --java-version 21 --image eclipse-temurin:21-jammy"
elif echo $TAG | grep -q "java17"; then
OPTS+=" --java-version 17 --image eclipse-temurin:17-jammy"
@@ -82,7 +93,7 @@ for TAG in $TAGS; do
mkdir -p $VERSION/$TAG
- if [ "$TAG" == "scala2.12-java11-ubuntu" ] || [ "$TAG" ==
"scala2.12-java17-ubuntu" ] || [ "$TAG" == "scala2.13-java17-ubuntu" ] || [
"$TAG" == "scala2.13-java21-ubuntu" ]; then
+ if [ "$TAG" == "scala2.12-java11-ubuntu" ] || [ "$TAG" ==
"scala2.12-java17-ubuntu" ] || [ "$TAG" == "scala2.13-java17-ubuntu" ] || [
"$TAG" == "scala2.13-java21-ubuntu" ] || [ "$TAG" == "scala2.13-java25-ubuntu"
]; then
python3 tools/template.py $OPTS > $VERSION/$TAG/Dockerfile
python3 tools/template.py $OPTS -f entrypoint.sh.template >
$VERSION/$TAG/entrypoint.sh
chmod a+x $VERSION/$TAG/entrypoint.sh
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]