Skip to content

distroless: backport base-nossl swap and production-last stage order to 25.8 - #119492

Merged
motsc merged 1 commit into
25.8from
backport-nossl-25.8
Sep 11, 2026
Merged

motsc merged 1 commit into
25.8from
backport-nossl-25.8

Conversation

@motsc

@motsc motsc commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

25.8 still pins gcr.io/distroless/cc-debian13, so every release on this line ships the 7 packages the base-nossl swap (#107837) removed: gcc-14-base, libgcc-s1, libgomp1, libssl3t64, libstdc++6, libzstd1, zlib1g. ClickHouse statically links all of them, so none are used at runtime.

That is what put a fixable HIGH on the published images: CVE-2026-14456 in libssl3t64 3.5.6-1~deb13u2. The 25.8-distroless floating tags were only cleared by rebuilding them off master (run 34612103488, 23 layers -> 16, Trivy HIGH/CRITICAL 1 -> 0). Without this backport the next release on this line reintroduces it.

Also reorders the stages so production is last. buildx defaults to the final stage when --target is omitted, and on this branch that is the busybox debug image. Defense in depth, matching master.

Only master's two stage blocks are spliced in. Everything above them is untouched, so the branch's ARG VERSION default, wget handling and apt mirror args are preserved. Diff is 18 lines per file, base digests plus stage order and the header comment.

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

Version info

  • Merged into: 25.8.34.12

…to 25.8

The 25.8 branch still pins gcr.io/distroless/cc-debian13, so every release
on this line ships the 7 packages the base-nossl swap removed
(gcc-14-base, libgcc-s1, libgomp1, libssl3t64, libstdc++6, libzstd1,
zlib1g), none of which ClickHouse uses since it statically links them.
That is what put a fixable HIGH (CVE-2026-14456 in libssl3t64) on the
published 25.8-distroless images until they were rebuilt off master.
Without this backport the next release on this line reintroduces it.

Also reorders the stages so production is last. buildx defaults to the
final stage when --target is omitted, and on this branch that is the
busybox debug image. Defense in depth, matching master.

Splices only master's two stage blocks. Branch-specific content above
them (ARG VERSION default, wget handling, apt mirror args) is unchanged.
@clickhouse-gh

clickhouse-gh Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Workflow [BackportPR], commit [1cd39c1]

@motsc
motsc merged commit 2c21d8c into 25.8 Sep 11, 2026
25 of 28 checks passed
@motsc
motsc deleted the backport-nossl-25.8 branch September 11, 2026 16:29
kewin-robetti pushed a commit to viasoftkorp/ClickHouse that referenced this pull request Sep 18, 2026
… check (25.8)

Since ClickHouse#119492 swapped the 25.8 distroless base to
`gcr.io/distroless/base-nossl-debian13`, the images have no shell and no
coreutils, but `docker library image test` in `Docker server image` still
runs the `docker-library/official-images` global tests against them, so
`utc` fails with `exec: "date": executable file not found in $PATH` and
`no-hard-coded-passwords` with `exec: "cut": executable file not found in
$PATH`. That makes the job red on every pull request targeting 25.8 and on
the 25.8 release-branch CI itself.

26.3 and later are fixed by patching `ci/jobs/scripts/docker_server/config.sh`
(ClickHouse#119532), but that file is dead code on 25.8: the docker job here runs from
`tests/ci/docker_server.py`, which invokes `run.sh` without `-c` at all, so
only the official-images own `test/config.sh` is loaded. 25.8 also lacks
`ci/jobs/scripts/docker_server/tests/lib.sh` and the `clickhouse-basics` test,
so `clickhouse-distroless-no-shell` is the only repository test that can run
there.

So for distroless images `test_docker_library` now generates a small config
fragment next to `ci/jobs/scripts/docker_server/tests/` and passes it
alongside the upstream config. The fragment marks the image variant as
`explicitTests`, which is what keeps the global tests away, and maps it to
`clickhouse-distroless-no-shell`. The generated file is removed afterwards.
Non-distroless images keep the current code path unchanged.

The arch-suffixed local CI tags need that mapping because `run.sh` derives
the lookup variant from the last tag component: it looks
`clickhouse/clickhouse-server:head-distroless-amd64` up as
`clickhouse/clickhouse-server:amd64`.

Verified against a fresh clone of `docker-library/official-images` with the
test selection printed instead of executed: without the change the distroless
server image selects `utc no-hard-coded-passwords override-cmd` (exactly the
three tests of the failing CI run), with it only
`clickhouse-distroless-no-shell`, and as a control the same fragment with the
`explicitTests` entry removed brings the three global tests back. Selection
for non-distroless tags is unchanged.

Thanks to @groeneai, who diagnosed the 25.8-specific shape of this and
validated the same patch end to end against the real official-images suite
using `gcr.io/distroless/base-nossl-debian13`, on both amd64 and arm64.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant