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/03/19 21:12:49 UTC
(spark-connect-swift) branch main updated: [SPARK-56082] Optimize `spark-sql` example Docker image size
This is an automated email from the ASF dual-hosted git repository.
dongjoon 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 9812ae2 [SPARK-56082] Optimize `spark-sql` example Docker image size
9812ae2 is described below
commit 9812ae2b4653e84c4a06205910cfec730e3e18b0
Author: Dongjoon Hyun <do...@apache.org>
AuthorDate: Thu Mar 19 14:12:41 2026 -0700
[SPARK-56082] Optimize `spark-sql` example Docker image size
### What changes were proposed in this pull request?
This PR aims to optimize `spark-sql` example Dockerfile: shrunk image size by **~33% (128MB -> 85.1MB)**
```diff
IMAGE ID DISK USAGE CONTENT SIZE EXTRA
-apache/spark-connect-swift:spark-sql f97a7af7b0ff 550MB 128MB
+apache/spark-connect-swift:spark-sql f4ee9e7df9eb 373MB 85.1MB
```
### Why are the changes needed?
To provide a best practice for `Apache Spark Connect Client` usage. This is similar to the previous effort.
- #322
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
Manual review.
### Was this patch authored or co-authored using generative AI tooling?
Generated-by: `Gemini 3.1 Pro (High)` on `Antigravity`.
Closes #323 from dongjoon-hyun/SPARK-56082.
Authored-by: Dongjoon Hyun <do...@apache.org>
Signed-off-by: Dongjoon Hyun <do...@apache.org>
---
Examples/spark-sql/Dockerfile | 4 ++--
Examples/spark-sql/README.md | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Examples/spark-sql/Dockerfile b/Examples/spark-sql/Dockerfile
index 8917da4..2fab87e 100644
--- a/Examples/spark-sql/Dockerfile
+++ b/Examples/spark-sql/Dockerfile
@@ -20,9 +20,9 @@ WORKDIR /app
COPY . .
-RUN swift build -c release
+RUN swift build -c release --static-swift-stdlib
-FROM swift:6.2-slim
+FROM ubuntu:24.04
ARG SPARK_UID=185
diff --git a/Examples/spark-sql/README.md b/Examples/spark-sql/README.md
index 13decd1..da056c6 100644
--- a/Examples/spark-sql/README.md
+++ b/Examples/spark-sql/README.md
@@ -16,7 +16,7 @@ Build an application Docker image.
$ docker build -t apache/spark-connect-swift:spark-sql .
$ docker images apache/spark-connect-swift:spark-sql
IMAGE ID DISK USAGE CONTENT SIZE EXTRA
-apache/spark-connect-swift:spark-sql f97a7af7b0ff 550MB 128MB
+apache/spark-connect-swift:spark-sql f4ee9e7df9eb 373MB 85.1MB
```
Run `spark-sql` docker image.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org