You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by do...@apache.org on 2026/09/23 15:50:56 UTC
(spark-connect-swift) branch main updated: [SPARK-59735] Use `static-debian13` distroless image in `Examples`
This is an automated email from the ASF dual-hosted git repository.
dongjoon-hyun pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/spark-connect-swift.git
The following commit(s) were added to refs/heads/main by this push:
new 23aa5d9 [SPARK-59735] Use `static-debian13` distroless image in `Examples`
23aa5d9 is described below
commit 23aa5d9b9169dfa11d8e9c2b75594d517eda1391
Author: Dongjoon Hyun <do...@apache.org>
AuthorDate: Wed Sep 23 08:50:49 2026 -0700
[SPARK-59735] Use `static-debian13` distroless image in `Examples`
### What changes were proposed in this pull request?
This PR aims to upgrade the base image of the Swift examples (`app`, `pi`, `spark-sql`, `stream`) from `gcr.io/distroless/static-debian12:nonroot` to `gcr.io/distroless/static-debian13:nonroot`.
### Why are the changes needed?
To use the latest Debian 13 (Trixie)-based distroless image.
Since the example binaries are fully statically linked via the Swift Static Linux SDK (`*-swift-linux-musl`), they don't depend on the base image's libc. The two images have the same runtime configuration:
| | `static-debian12:nonroot` | `static-debian13:nonroot` |
|---|---|---|
| `linux/amd64`, `linux/arm64` | Yes | Yes |
| User | `65532` | `65532` |
| WorkingDir | `/home/nonroot` | `/home/nonroot` |
| `SSL_CERT_FILE` | `/etc/ssl/certs/ca-certificates.crt` | `/etc/ssl/certs/ca-certificates.crt` |
### Does this PR introduce _any_ user-facing change?
No behavior change. Only the base image of the example Docker images is changed.
### How was this patch tested?
Manually built all four example images and ran the `pi` example against an Apache Spark 4.2.0 Spark Connect server.
```
$ docker build -t spark-connect-swift:pi Examples/pi
$ docker network create sc
$ docker run -d --rm --name spark --network sc -e SPARK_NO_DAEMONIZE=1 apache/spark:4.2.0 bash -c /opt/spark/sbin/start-connect-server.sh
$ docker run --rm --network sc -e SPARK_REMOTE=sc://spark:15002 spark-connect-swift:pi
Pi is roughly 3.142036
```
The image size increases by about 141KB (`linux/arm64`, Docker 29.5.3). The `docker images` example outputs in `Examples/*/README.md` (`112MB` / `32MB`) remain valid.
| Image | Base | DISK USAGE | CONTENT SIZE | Size (bytes) |
|---|---|---|---|---|
| `pi` | `static-debian12:nonroot` | 112MB | 32.1MB | 32,049,596 |
| `pi` | `static-debian13:nonroot` | 112MB | 32.2MB | 32,190,818 |
| `app`, `spark-sql`, `stream` | `static-debian13:nonroot` | 112MB | 32.2MB | - |
### Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Opus 5.5
Closes #574 from dongjoon-hyun/SPARK-59735.
Authored-by: Dongjoon Hyun <do...@apache.org>
Signed-off-by: Dongjoon Hyun <do...@apache.org>
---
Examples/app/Dockerfile | 2 +-
Examples/pi/Dockerfile | 2 +-
Examples/spark-sql/Dockerfile | 2 +-
Examples/stream/Dockerfile | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/Examples/app/Dockerfile b/Examples/app/Dockerfile
index 173c5af..75bedf5 100644
--- a/Examples/app/Dockerfile
+++ b/Examples/app/Dockerfile
@@ -27,7 +27,7 @@ COPY . .
RUN swift build -c release --swift-sdk $(uname -m)-swift-linux-musl && \
strip .build/release/SparkConnectSwiftApp
-FROM gcr.io/distroless/static-debian12:nonroot
+FROM gcr.io/distroless/static-debian13:nonroot
LABEL org.opencontainers.image.authors="Apache Spark project <de...@spark.apache.org>"
LABEL org.opencontainers.image.licenses="Apache-2.0"
diff --git a/Examples/pi/Dockerfile b/Examples/pi/Dockerfile
index ee002e8..21aa8c9 100644
--- a/Examples/pi/Dockerfile
+++ b/Examples/pi/Dockerfile
@@ -27,7 +27,7 @@ COPY . .
RUN swift build -c release --swift-sdk $(uname -m)-swift-linux-musl && \
strip .build/release/SparkConnectSwiftPi
-FROM gcr.io/distroless/static-debian12:nonroot
+FROM gcr.io/distroless/static-debian13:nonroot
LABEL org.opencontainers.image.authors="Apache Spark project <de...@spark.apache.org>"
LABEL org.opencontainers.image.licenses="Apache-2.0"
diff --git a/Examples/spark-sql/Dockerfile b/Examples/spark-sql/Dockerfile
index 9032b80..d810dc8 100644
--- a/Examples/spark-sql/Dockerfile
+++ b/Examples/spark-sql/Dockerfile
@@ -27,7 +27,7 @@ COPY . .
RUN swift build -c release --swift-sdk $(uname -m)-swift-linux-musl && \
strip .build/release/SparkConnectSwiftSQLRepl
-FROM gcr.io/distroless/static-debian12:nonroot
+FROM gcr.io/distroless/static-debian13:nonroot
LABEL org.opencontainers.image.authors="Apache Spark project <de...@spark.apache.org>"
LABEL org.opencontainers.image.licenses="Apache-2.0"
diff --git a/Examples/stream/Dockerfile b/Examples/stream/Dockerfile
index 6a7781d..c478e15 100644
--- a/Examples/stream/Dockerfile
+++ b/Examples/stream/Dockerfile
@@ -27,7 +27,7 @@ COPY . .
RUN swift build -c release --swift-sdk $(uname -m)-swift-linux-musl && \
strip .build/release/SparkConnectSwiftNetworkWordCount
-FROM gcr.io/distroless/static-debian12:nonroot
+FROM gcr.io/distroless/static-debian13:nonroot
LABEL org.opencontainers.image.authors="Apache Spark project <de...@spark.apache.org>"
LABEL org.opencontainers.image.licenses="Apache-2.0"
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org