[SPARK-60864] Publish Apache Spark 4.3.0 to docker registry ### What changes were proposed in this pull request? Publish Apache Spark 4.3.0 to the Docker registry: - Generate Scala 2.13 images for Java 17, 21, and 25, with Scala, Python, R, and Python/R variants. - Register the 4.3.0 release signing key and add the build/test workflow. - Add 4.3.0 to the publish/test workflows and make it the default version. - Add versioned image tags and move the floating tags, including `latest`, from 4.2.1 to 4.3.0. The Dockerfiles and entrypoints are generated using `./add-dockerfiles.sh 4.3.0`. ### Why are the changes needed? Apache Spark 4.3.0 has been released: - https://github.com/apache/spark/releases/tag/v4.3.0 - https://spark.apache.org/docs/4.3.0/ - https://dist.apache.org/repos/dist/release/spark/spark-4.3.0/ This follows the release publication changes in #141 for Spark 4.2.1. ### Does this PR introduce _any_ user-facing change? Yes. Adds Spark 4.3.0 image tags and updates the floating tags to use 4.3.0. ### How was this patch tested? - Generated all 12 image variants with `./add-dockerfiles.sh 4.3.0`. Apart from the version and the GPG key, they are identical to the 4.2.1 variants. - Checked the release signature's issuer fingerprint (`FD3E84942E5E6106235A1D25BD356A9F8740E4FF`) against Apache Spark KEYS and the public keyserver. - Compared the full diff with #141 after normalizing version strings. Only the GPG key and surrounding context lines differ. - Validated JSON/YAML, unique image tags, preservation of existing versioned tags, floating tag ownership (all on 4.3.0), and workflow matrices/defaults. - Checked all three generated entrypoints with `bash -n` and verified their executable permissions. - Ran the manifest tag generator and `git diff --check`. - Built `4.3.0/scala2.13-java17-ubuntu` locally with `docker build` (including GPG and SHA-512 verification of the release tarball). Then ran: - `spark-submit --version`: reports Spark 4.3.0, Scala 2.13.18, OpenJDK 17.0.21. - `run-example SparkPi 10`: prints `Pi is roughly 3.1409...`. The other image builds and the standalone/Kubernetes integration tests will run through the new Java 17/21/25 CI matrix. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Code (Claude Opus 5.5) Closes #143 from HeartSaVioR/spark-4.3.0-docker. Authored-by: Jungtaek Lim <kabhwan.opensource@gmail.com> Signed-off-by: Jungtaek Lim <kabhwan.opensource@gmail.com>
Spark is a unified analytics engine for large-scale data processing. It provides high-level APIs in Scala, Java, Python, and R, and an optimized engine that supports general computation graphs for data analysis. It also supports a rich set of higher-level tools including Spark SQL for SQL and DataFrames, pandas API on Spark for pandas workloads, MLlib for machine learning, GraphX for graph processing, and Structured Streaming for stream processing.
You can see 3.4.0 PR as reference.
1.1 Add gpg key to tools/template.py
This gpg key will be used by Dockerfiles (such as 3.4.0) to verify the signature of the Apache Spark tarball.
1.2 Add image build workflow (such as 3.4.0 yaml)
This file will be used by GitHub Actions to build the Docker image when you submit the PR to make sure dockerfiles are correct and pass all tests (build/standalone/kubernetes).
1.3 Using ./add-dockerfiles.sh [version] to add Dockerfiles.
You will get a new directory with the Dockerfiles for the specified version.
1.4 Add version and tag info to versions.json, publish.yml and test.yml.
This version file will be used by image build workflow (such as 3.4.0 reference) and docker official image.
Click Publish (Java 25 only), Publish (Java 21 only), Publish (Java 17 only) or Publish (such as 3.x) to publish images.
After this, the apache/spark docker images will be published.
Submit the PR to docker-library/official-images, see (link)[https://github.com/docker-library/official-images/pull/15363] as reference.
You can type tools/manifest.py manifest to generate the content.
After this, the spark docker images will be published.
| Apache Spark Image | Spark Docker Official Image | |
|---|---|---|
| Name | apache/spark | spark |
| Maintenance | Reviewed, published by Apache Spark community | Reviewed, published and maintained by Docker community |
| Update policy | Only build and push once when specific version release | Actively rebuild for updates and security fixes |
| Link | https://hub.docker.com/r/apache/spark | https://hub.docker.com/_/spark |
| source | apache/spark-docker | apache/spark-docker and docker-library/official-images |
We advise using official Apache Spark images to maintain architectural uniformity across related projects, including the Apache Spark K8s Operator and Apache Spark Connect for Swift.
This repository contains the Dockerfiles used to build the Apache Spark Docker Image.
See more in SPARK-40513: SPIP: Support Docker Official Image for Spark.