Document base image policy and switch defaults to slim trixie#11
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR formalizes how Rust base images are selected/pinned and updates the repo to use composite Rust base keys (variant + Debian codename), switching the default pairing to *-slim-trixie and ensuring Docker builds reference Rust base images by digest.
Changes:
- Re-keys
builds.jsonto use composite Rust base keys (e.g.1.95.0-slim-trixie) and threads the new key through scripts and workflows. - Updates the Dockerfile to
FROM rust@<digest>(digest-only), surfacing human-readable base info via OCI labels. - Enhances validation/smoke-test behavior and refresh/release tooling to work with the new key scheme and digest pinning.
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
scripts/tag-names.sh |
Builds canonical tags using the composite Rust base key. |
scripts/smoke-test-image.sh |
Validates OCI labels and cross-checks base digest + cli revision. |
scripts/resolve-matrix.sh |
Emits workflow matrix rows including parsed version/suffix from composite key. |
scripts/repro-test.sh |
Updates examples to reflect new tag format. |
scripts/release-prepare.sh |
Picks default Rust base keys from Docker Hub tag listings and threads suffix. |
scripts/release-body.sh |
Groups/sorts release metadata by composite key and bare Rust version. |
scripts/refresh-rust-digests.sh |
Refreshes pinned digests by inspecting rust:<key> upstream tags. |
scripts/newest-pair.sh |
Reports newest (cli, rust base key) pairing. |
scripts/lib/common.sh |
Adds key parsing helpers and updates digest/pair resolution for composite keys. |
scripts/build-image.sh |
Builds local images using composite keys and passes suffix/version build args. |
RELEASE.md |
Documents base image policy and updates release process examples for new tags/keys. |
README.md |
Updates user-facing docs and examples to the new tag/key scheme. |
Dockerfile |
Switches to digest-only FROM rust@... and standardizes on OCI labels. |
builds.schema.json |
Renames/validates Rust version fields to composite rust base keys. |
builds.json |
Migrates stored rust digests and cli pairings to composite keys; updates defaults. |
.github/workflows/release.yml |
Updates release workflow messaging to “rust base” terminology. |
.github/workflows/publish.yml |
Threads composite key/suffix through tagging, build args, artifacts, and metadata. |
.github/workflows/build.yml |
Adds concurrency cancellation for PRs and updates smoke build tag derivation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
leighmcculloch
approved these changes
May 28, 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.
Closes #7.
What
rust:<v>-slim-trixie.builds.jsonso each entry carries a composite rust base key (<rust>[-slim]-<debian>, e.g.1.94.0-slim-trixie). The same key flows verbatim into the published image tag:<cli>-rust<key>[-arch].FROMlines now reference the base image by digest only —FROM rust@${RUST_IMAGE_DIGEST}— never by tag. Variant + Debian codename surface in OCI labels via aRUST_BASE_SUFFIXbuild-arg.tag-names.sh,build-image.sh,resolve-matrix.sh,smoke-test-image.sh,release-prepare.sh,release-body.sh, plus the matching workflow build-args, sbom/provenance filenames, and per-arch metadata.Why
Issue #7 flagged that the
Dockerfilehard-codedslim-bookwormwithout a written rule, andbookwormis now Debianoldstable. The policy section inRELEASE.mdnow spells out:slimupstream image. Non-slim SBOMs exceed the per-file size limit imposed byactions/attest, which fails the GitHub-native SBOM attestation step. The builder stage installsbuild-essential,ca-certificates,git,libssl-dev, andpkg-configexplicitly because slim doesn't ship them.trixie), so users on the prevailing LTS aren't running on a Debian newer than what their host's upstream tracks.Notable details
<cli>-rust<rust>-[slim-]<debian>[-arch], mirroring the upstream Rust image's own naming.aliasesjob (:<cli>,:latest) is unchanged; it just resolves through the new compositedefault_rustvalue.FROM rust@<digest>form means aRUST_VERSIONorRUST_BASE_SUFFIXdrift can no longer silently disagree with the bytes the digest pulls.build.ymlgained aconcurrency:block that cancels in-flight runs on PR pushes (main pushes still run to completion).smoke-test-image.shnow cross-checksorg.opencontainers.image.base.digestagainst the digest pinned inbuilds.jsonfor the rust base key, andorg.opencontainers.image.revisionagainst the declared stellar-cli ref — so a build that quietly used a different upstream base or commit would fail the smoke test.org.opencontainers.image.*); the previousorg.stellar.*namespace was dropped because every value either duplicated an OCI label (stellar-cli-version↔image.version,stellar-cli-ref↔image.revision,rust-image-digest↔image.base.digest) or was derivable from other on-image data (rust-versionandrust-base-suffixfromimage.base.name;build-archfrom the manifest'splatform.architecture).release-prepare.shpicks candidate rust base keys from Docker Hub'slibrary/rusttag list, not rust-lang/rust's GitHub Releases. Rust toolchain releases ship torust-lang/ruston GitHub the moment they're tagged, but the matchingrust:<v>-<suffix>Docker image is built and published by the docker-rust team separately, often lagging by hours. Sourcing candidates from Docker Hub means the picker can only see versions whose image is actually pullable, so the workflow can never stage a release that names a key like1.96.0-slim-trixieminutes before that tag exists on the registry. The local regex on the API response enforces the exact<x.y.z>-<suffix>shape, so an existing1.96.0-trixie(different variant) or1.96.0-slim-bookworm(different debian) won't get picked when the chosen suffix isslim-trixie.End-to-end verification on a fork
Exercised the full pipeline against
fnando/stellar-cli-dockerwith the new slim-trixie defaults and the Docker-Hub-driven picker:releaseworkflow run — picker resolved to1.94.1-slim-trixie+1.95.0-slim-trixie(not1.96.0-slim-trixie, becauserust:1.96.0-slim-trixiehasn't been published by the docker-rust team yet despite rust-lang/rust releasing 1.96.0 earlier the same day). Stagedbuilds.json, opened the release PR.publishworkflow run — all four per-arch builds (1.94.1+1.95.0×amd64+arm64) plus manifest, aliases, and release-body jobs all green. The SBOM attestation step fits theactions/attestsize limit cleanly on slim.fnando/stellar-cli-experimental::26.1.0(moving alias →1.95.0-slim-trixiemanifest list):26.1.0-rust1.94.1-slim-trixie,:26.1.0-rust1.95.0-slim-trixie(per-pair manifest lists):26.1.0-rust1.94.1-slim-trixie-amd64,…-arm64,:26.1.0-rust1.95.0-slim-trixie-amd64,…-arm64Sample image labels
The labels on the freshly published
26.1.0-rust1.95.0-slim-trixie-arm64image — 12 OCI standard labels, no custom namespace:image.base.namecarries the human-readablerust:1.95.0-slim-trixie(variant + Debian + version);image.base.digestis the multi-arch index digest pinned inbuilds.json;image.revisionis the upstream stellar-cli commit SHA. Everything else needed for verification is in the manifest itself.Local test plan
./scripts/validate-json.sh,./scripts/validate-shell.sh,shellcheck scripts/*.sh scripts/lib/*.sh— all clean../scripts/build-image.sh --stellar-cli-version 26.0.0 --rust-version 1.94.0-slim-trixiebuilds successfully../scripts/smoke-test-image.sh --image stellar-cli:26.0.0-rust1.94.0-slim-trixie --stellar-cli-version 26.0.0 --rust-version 1.94.0-slim-trixie— passes all four OCI label assertions, including theimage.base.digestcross-check againstbuilds.jsonand theimage.revisioncross-check against the declared stellar-cli ref.application/vnd.oci.image.index.v1+jsonmulti-arch indexes.