Repository navigation
distroless: swap base to base-nossl-debian13 - #107837
Merged
Merged
Conversation
ClickHouse statically links its own openssl, libstdc++, zlib, zstd, gomp. The binary's DT_NEEDED is only 5 glibc libs (librt, libpthread, libc, libm, libdl), so the 7 extra packages the cc-debian13 base ships are dead weight that each turn into a recurring CVE chase (libssl3t64 was the latest, fixed in ClickHouse#107677). Swap server + keeper Dockerfile.distroless to base-nossl-debian13:nonroot which keeps glibc and drops gcc-14-base, libgcc-s1, libgomp1, libssl3t64, libstdc++6, libzstd1, zlib1g. Base package count goes 13 -> 6. Smoke-tested on amd64 with VERSION=26.5.2.39: - clickhouse --version / server --version / keeper --version all clean - server starts, MergeTree+INSERT 10k rows, ZSTD codec round-trip OK - outbound HTTPS via url() to api.github.com and S3 works (TLS handshake succeeds — confirms statically-linked openssl is self-sufficient) - keeper 4LW (ruok->imok, mntr, srvr) responds, no errors in logs - Trivy --severity HIGH,CRITICAL --ignore-unfixed: 0 on both prod images Follow-up to ClickHouse#107677.
Contributor
|
Workflow [PR], commit [463eb89] Summary: ✅ AI ReviewSummaryThis PR swaps the server and keeper Missing context / blind spots
Final VerdictStatus: ✅ Approve No inline findings. Merge should still wait for the pending Docker image CI to finish successfully. |
motsc
marked this pull request as ready for review
June 18, 2026 10:16
motsc
enabled auto-merge
June 18, 2026 12:30
maxknv
approved these changes
Jun 18, 2026
1 task done
Merged
via the queue into
ClickHouse:master
with commit Jun 21, 2026
7508b07
488 of 490 checks passed
1 task done
This was referenced Sep 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Followup to #107677. clickhouse already statically links its own openssl/libstdc++/zlib/zstd/gomp — only 5 glibc libs in
DT_NEEDED(librt, libpthread, libc, libm, libdl). So the 7 packagescc-debian13ships on top of glibc (gcc-14-base libgcc-s1 libgomp1 libssl3t64 libstdc++6 libzstd1 zlib1g) are dead weight we chase CVEs on every few weeks.libssl3t64was the latest one. Swap tobase-nossl-debian13:nonrootdrops them all. Base goes 13 -> 6 packages.i wanted to be sure the binary really doesn't need any of that before flipping, so i ran a broad smoke on 26.5.2.39 across both arches:
--versionon server + keeper, prod + debug targets, amd64 + arm64. all clean, dynamic linker happy.url('https://api.github.com/zen')andurl('https://...s3.amazonaws.com/...')— handshakes complete, bodies returned. statically-linked openssl client doesn't needlibssl3t64.randomString/randomPrintableASCIIlength + entropy. byte-identical hashes between amd64 and arm64.Content-Encoding: gzipworks both directions. statically-linked zstd + zlib OK.interserver_http_portremoved entirely,interserver_https_port=9010, mounted cert): 3000 rows fetched srv-1 -> srv-2 in 2s, bit-identical. that's the inter-server TLS data plane proven, not just the listener.--severity HIGH,CRITICAL --ignore-unfixedon all four prod images (server/keeper × amd64/arm64): 0 findings.<Error>or<Fatal>log lines in any container during any of the above.CA bundle
/etc/ssl/certs/ca-certificates.crtstill ships inbase-nossl, outbound verification unchanged./busybox/pgrepstory is identical tocc-debian13— present indebug-nonroot, absent innonroot. operator probe path is unaffected either way.Prod image sizes: 790 MB amd64, 755 MB arm64.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Switch the distroless server and keeper images to
gcr.io/distroless/base-nossl-debian13so they only ship the libraries ClickHouse actually links against and stop pulling in ones we statically link ourselves.Documentation entry for user-facing changes
Version info
26.6.1.1088