Document base image policy and switch defaults to slim trixie - #11

Merged
fnando merged 26 commits into
mainfrom
image-base-defaults
May 29, 2026
Merged

Document base image policy and switch defaults to slim trixie#11
fnando merged 26 commits into
mainfrom
image-base-defaults

Conversation

@fnando

@fnandofnando commented May 28, 2026

Copy link
Copy Markdown
Member

Closes#7.

What

  • Document a written base-image policy and switch the defaults to rust:<v>-slim-trixie.
  • Re-key builds.json so 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].
  • Dockerfile FROM lines now reference the base image by digest only — FROM rust@${RUST_IMAGE_DIGEST} — never by tag. Variant + Debian codename surface in OCI labels via a RUST_BASE_SUFFIX build-arg.
  • Thread the composite key through every consumer: 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 Dockerfile hard-coded slim-bookworm without a written rule, and bookworm is now Debian oldstable. The policy section in RELEASE.md now spells out:

  • Variant — use the slim upstream image. Non-slim SBOMs exceed the per-file size limit imposed by actions/attest, which fails the GitHub-native SBOM attestation step. The builder stage installs build-essential, ca-certificates, git, libssl-dev, and pkg-config explicitly because slim doesn't ship them.
  • Debian codename — track the Debian release used by the latest Ubuntu LTS (currently 26.04 → Debian 13 / trixie), so users on the prevailing LTS aren't running on a Debian newer than what their host's upstream tracks.
  • Tag — include variant + Debian in the image tag so future switches don't collide with the per-arch tag-immutability rule.

Notable details

  • Image tag format becomes <cli>-rust<rust>-[slim-]<debian>[-arch], mirroring the upstream Rust image's own naming.
  • The aliases job (:<cli>, :latest) is unchanged; it just resolves through the new composite default_rust value.
  • The FROM rust@<digest> form means a RUST_VERSION or RUST_BASE_SUFFIX drift can no longer silently disagree with the bytes the digest pulls.
  • build.yml gained a concurrency: block that cancels in-flight runs on PR pushes (main pushes still run to completion).
  • smoke-test-image.sh now cross-checks org.opencontainers.image.base.digest against the digest pinned in builds.json for the rust base key, and org.opencontainers.image.revision against the declared stellar-cli ref — so a build that quietly used a different upstream base or commit would fail the smoke test.
  • The image now carries only OCI standard labels (org.opencontainers.image.*); the previous org.stellar.* namespace was dropped because every value either duplicated an OCI label (stellar-cli-versionimage.version, stellar-cli-refimage.revision, rust-image-digestimage.base.digest) or was derivable from other on-image data (rust-version and rust-base-suffix from image.base.name; build-arch from the manifest's platform.architecture).
  • release-prepare.sh picks candidate rust base keys from Docker Hub's library/rust tag list, not rust-lang/rust's GitHub Releases. Rust toolchain releases ship to rust-lang/rust on GitHub the moment they're tagged, but the matching rust:<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 like 1.96.0-slim-trixie minutes before that tag exists on the registry. The local regex on the API response enforces the exact <x.y.z>-<suffix> shape, so an existing 1.96.0-trixie (different variant) or 1.96.0-slim-bookworm (different debian) won't get picked when the chosen suffix is slim-trixie.

End-to-end verification on a fork

Exercised the full pipeline against fnando/stellar-cli-docker with the new slim-trixie defaults and the Docker-Hub-driven picker:

  1. release workflow run — picker resolved to 1.94.1-slim-trixie + 1.95.0-slim-trixie (not 1.96.0-slim-trixie, because rust:1.96.0-slim-trixie hasn't been published by the docker-rust team yet despite rust-lang/rust releasing 1.96.0 earlier the same day). Staged builds.json, opened the release PR.
  2. Release PR #13 — reviewed and merged.
  3. GitHub Release v26.1.0 — published; the publish workflow enriched the body with per-arch digests + copy-paste-runnable verify commands.
  4. publish workflow 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 the actions/attest size limit cleanly on slim.
  5. Published images on Docker Hub at fnando/stellar-cli-experimental:
    • :26.1.0 (moving alias → 1.95.0-slim-trixie manifest list)
    • :26.1.0-rust1.94.1-slim-trixie, :26.1.0-rust1.95.0-slim-trixie (per-pair manifest lists)
    • Per-arch tags: :26.1.0-rust1.94.1-slim-trixie-amd64, …-arm64, :26.1.0-rust1.95.0-slim-trixie-amd64, …-arm64

Sample image labels

The labels on the freshly published 26.1.0-rust1.95.0-slim-trixie-arm64 image — 12 OCI standard labels, no custom namespace:

$ docker buildx imagetools inspect \
docker.io/fnando/stellar-cli-experimental:26.1.0-rust1.95.0-slim-trixie-arm64@sha256:7ea3f587bf32de569d2bb98852e8dddf785628ece7979d49c96cb8514b8b77c0 \
--format '{{ json .Image.Config.Labels }}' | jq .
{
"org.opencontainers.image.base.digest": "sha256:e14e87345b4d5964ddcc3491d27ee046a0f23820f340c3c1e24da6880141f7c0",
"org.opencontainers.image.base.name": "docker.io/library/rust:1.95.0-slim-trixie",
"org.opencontainers.image.created": "2026-05-28T20:36:13Z",
"org.opencontainers.image.description": "Stellar CLI image (SEP-58-compatible image for Stellar smart contracts).",
"org.opencontainers.image.documentation": "https://github.com/fnando/stellar-cli-docker",
"org.opencontainers.image.licenses": "Apache-2.0",
"org.opencontainers.image.revision": "1228cff8022b804659750b94b315932b0e0f3f6a",
"org.opencontainers.image.source": "https://github.com/fnando/stellar-cli-docker",
"org.opencontainers.image.title": "stellar-cli",
"org.opencontainers.image.url": "https://github.com/fnando/stellar-cli-docker",
"org.opencontainers.image.vendor": "Stellar Development Foundation",
"org.opencontainers.image.version": "26.1.0"
}

image.base.name carries the human-readable rust:1.95.0-slim-trixie (variant + Debian + version); image.base.digest is the multi-arch index digest pinned in builds.json; image.revision is 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-trixie builds 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 the image.base.digest cross-check against builds.json and the image.revision cross-check against the declared stellar-cli ref.
  • Inspected the upstream digests: all pinned digests resolve to application/vnd.oci.image.index.v1+json multi-arch indexes.

@fnando
fnando marked this pull request as ready for review May 28, 2026 20:59
CopilotAI review requested due to automatic review settings May 28, 2026 20:59
@fnandofnando self-assigned this May 28, 2026
@fnandofnando added this to DevXMay 28, 2026
@github-project-automationgithub-project-automationBot moved this to Backlog (Not Ready) in DevXMay 28, 2026
@fnandofnando moved this from Backlog (Not Ready) to Needs Review in DevXMay 28, 2026

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.json to 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
FileDescription
scripts/tag-names.shBuilds canonical tags using the composite Rust base key.
scripts/smoke-test-image.shValidates OCI labels and cross-checks base digest + cli revision.
scripts/resolve-matrix.shEmits workflow matrix rows including parsed version/suffix from composite key.
scripts/repro-test.shUpdates examples to reflect new tag format.
scripts/release-prepare.shPicks default Rust base keys from Docker Hub tag listings and threads suffix.
scripts/release-body.shGroups/sorts release metadata by composite key and bare Rust version.
scripts/refresh-rust-digests.shRefreshes pinned digests by inspecting rust:<key> upstream tags.
scripts/newest-pair.shReports newest (cli, rust base key) pairing.
scripts/lib/common.shAdds key parsing helpers and updates digest/pair resolution for composite keys.
scripts/build-image.shBuilds local images using composite keys and passes suffix/version build args.
RELEASE.mdDocuments base image policy and updates release process examples for new tags/keys.
README.mdUpdates user-facing docs and examples to the new tag/key scheme.
DockerfileSwitches to digest-only FROM rust@... and standardizes on OCI labels.
builds.schema.jsonRenames/validates Rust version fields to composite rust base keys.
builds.jsonMigrates stored rust digests and cli pairings to composite keys; updates defaults.
.github/workflows/release.ymlUpdates release workflow messaging to “rust base” terminology.
.github/workflows/publish.ymlThreads composite key/suffix through tagging, build args, artifacts, and metadata.
.github/workflows/build.ymlAdds concurrency cancellation for PRs and updates smoke build tag derivation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment threadRELEASE.md Outdated
Comment threadREADME.md Outdated
Comment threadREADME.md Outdated
Comment threadscripts/resolve-matrix.sh Outdated
Comment threadscripts/tag-names.sh Outdated
Comment threadREADME.md Outdated
Comment threadRELEASE.md Outdated
@fnando
fnando merged commit 1ddb0bd into mainMay 29, 2026
11 checks passed
@fnando
fnando deleted the image-base-defaults branch May 29, 2026 00:19
@github-project-automationgithub-project-automationBot moved this from Needs Review to Done in DevXMay 29, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Image base variant + version and switching defaults

3 participants

@fnando@leighmcculloch
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

Document base image policy and switch defaults to slim trixie - #11

Merged
fnando merged 26 commits into
mainfrom
image-base-defaults
May 29, 2026
Merged

Document base image policy and switch defaults to slim trixie#11
fnando merged 26 commits into
mainfrom
image-base-defaults

Conversation

@fnando

@fnandofnando commented May 28, 2026

Copy link
Copy Markdown
Member

Closes#7.

What

  • Document a written base-image policy and switch the defaults to rust:<v>-slim-trixie.
  • Re-key builds.json so 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].
  • Dockerfile FROM lines now reference the base image by digest only — FROM rust@${RUST_IMAGE_DIGEST} — never by tag. Variant + Debian codename surface in OCI labels via a RUST_BASE_SUFFIX build-arg.
  • Thread the composite key through every consumer: 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 Dockerfile hard-coded slim-bookworm without a written rule, and bookworm is now Debian oldstable. The policy section in RELEASE.md now spells out:

  • Variant — use the slim upstream image. Non-slim SBOMs exceed the per-file size limit imposed by actions/attest, which fails the GitHub-native SBOM attestation step. The builder stage installs build-essential, ca-certificates, git, libssl-dev, and pkg-config explicitly because slim doesn't ship them.
  • Debian codename — track the Debian release used by the latest Ubuntu LTS (currently 26.04 → Debian 13 / trixie), so users on the prevailing LTS aren't running on a Debian newer than what their host's upstream tracks.
  • Tag — include variant + Debian in the image tag so future switches don't collide with the per-arch tag-immutability rule.

Notable details

  • Image tag format becomes <cli>-rust<rust>-[slim-]<debian>[-arch], mirroring the upstream Rust image's own naming.
  • The aliases job (:<cli>, :latest) is unchanged; it just resolves through the new composite default_rust value.
  • The FROM rust@<digest> form means a RUST_VERSION or RUST_BASE_SUFFIX drift can no longer silently disagree with the bytes the digest pulls.
  • build.yml gained a concurrency: block that cancels in-flight runs on PR pushes (main pushes still run to completion).
  • smoke-test-image.sh now cross-checks org.opencontainers.image.base.digest against the digest pinned in builds.json for the rust base key, and org.opencontainers.image.revision against the declared stellar-cli ref — so a build that quietly used a different upstream base or commit would fail the smoke test.
  • The image now carries only OCI standard labels (org.opencontainers.image.*); the previous org.stellar.* namespace was dropped because every value either duplicated an OCI label (stellar-cli-versionimage.version, stellar-cli-refimage.revision, rust-image-digestimage.base.digest) or was derivable from other on-image data (rust-version and rust-base-suffix from image.base.name; build-arch from the manifest's platform.architecture).
  • release-prepare.sh picks candidate rust base keys from Docker Hub's library/rust tag list, not rust-lang/rust's GitHub Releases. Rust toolchain releases ship to rust-lang/rust on GitHub the moment they're tagged, but the matching rust:<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 like 1.96.0-slim-trixie minutes before that tag exists on the registry. The local regex on the API response enforces the exact <x.y.z>-<suffix> shape, so an existing 1.96.0-trixie (different variant) or 1.96.0-slim-bookworm (different debian) won't get picked when the chosen suffix is slim-trixie.

End-to-end verification on a fork

Exercised the full pipeline against fnando/stellar-cli-docker with the new slim-trixie defaults and the Docker-Hub-driven picker:

  1. release workflow run — picker resolved to 1.94.1-slim-trixie + 1.95.0-slim-trixie (not 1.96.0-slim-trixie, because rust:1.96.0-slim-trixie hasn't been published by the docker-rust team yet despite rust-lang/rust releasing 1.96.0 earlier the same day). Staged builds.json, opened the release PR.
  2. Release PR #13 — reviewed and merged.
  3. GitHub Release v26.1.0 — published; the publish workflow enriched the body with per-arch digests + copy-paste-runnable verify commands.
  4. publish workflow 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 the actions/attest size limit cleanly on slim.
  5. Published images on Docker Hub at fnando/stellar-cli-experimental:
    • :26.1.0 (moving alias → 1.95.0-slim-trixie manifest list)
    • :26.1.0-rust1.94.1-slim-trixie, :26.1.0-rust1.95.0-slim-trixie (per-pair manifest lists)
    • Per-arch tags: :26.1.0-rust1.94.1-slim-trixie-amd64, …-arm64, :26.1.0-rust1.95.0-slim-trixie-amd64, …-arm64

Sample image labels

The labels on the freshly published 26.1.0-rust1.95.0-slim-trixie-arm64 image — 12 OCI standard labels, no custom namespace:

$ docker buildx imagetools inspect \
docker.io/fnando/stellar-cli-experimental:26.1.0-rust1.95.0-slim-trixie-arm64@sha256:7ea3f587bf32de569d2bb98852e8dddf785628ece7979d49c96cb8514b8b77c0 \
--format '{{ json .Image.Config.Labels }}' | jq .
{
"org.opencontainers.image.base.digest": "sha256:e14e87345b4d5964ddcc3491d27ee046a0f23820f340c3c1e24da6880141f7c0",
"org.opencontainers.image.base.name": "docker.io/library/rust:1.95.0-slim-trixie",
"org.opencontainers.image.created": "2026-05-28T20:36:13Z",
"org.opencontainers.image.description": "Stellar CLI image (SEP-58-compatible image for Stellar smart contracts).",
"org.opencontainers.image.documentation": "https://github.com/fnando/stellar-cli-docker",
"org.opencontainers.image.licenses": "Apache-2.0",
"org.opencontainers.image.revision": "1228cff8022b804659750b94b315932b0e0f3f6a",
"org.opencontainers.image.source": "https://github.com/fnando/stellar-cli-docker",
"org.opencontainers.image.title": "stellar-cli",
"org.opencontainers.image.url": "https://github.com/fnando/stellar-cli-docker",
"org.opencontainers.image.vendor": "Stellar Development Foundation",
"org.opencontainers.image.version": "26.1.0"
}

image.base.name carries the human-readable rust:1.95.0-slim-trixie (variant + Debian + version); image.base.digest is the multi-arch index digest pinned in builds.json; image.revision is 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-trixie builds 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 the image.base.digest cross-check against builds.json and the image.revision cross-check against the declared stellar-cli ref.
  • Inspected the upstream digests: all pinned digests resolve to application/vnd.oci.image.index.v1+json multi-arch indexes.

@fnando
fnando marked this pull request as ready for review May 28, 2026 20:59
CopilotAI review requested due to automatic review settings May 28, 2026 20:59
@fnandofnando self-assigned this May 28, 2026
@fnandofnando added this to DevXMay 28, 2026
@github-project-automationgithub-project-automationBot moved this to Backlog (Not Ready) in DevXMay 28, 2026
@fnandofnando moved this from Backlog (Not Ready) to Needs Review in DevXMay 28, 2026

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.json to 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
FileDescription
scripts/tag-names.shBuilds canonical tags using the composite Rust base key.
scripts/smoke-test-image.shValidates OCI labels and cross-checks base digest + cli revision.
scripts/resolve-matrix.shEmits workflow matrix rows including parsed version/suffix from composite key.
scripts/repro-test.shUpdates examples to reflect new tag format.
scripts/release-prepare.shPicks default Rust base keys from Docker Hub tag listings and threads suffix.
scripts/release-body.shGroups/sorts release metadata by composite key and bare Rust version.
scripts/refresh-rust-digests.shRefreshes pinned digests by inspecting rust:<key> upstream tags.
scripts/newest-pair.shReports newest (cli, rust base key) pairing.
scripts/lib/common.shAdds key parsing helpers and updates digest/pair resolution for composite keys.
scripts/build-image.shBuilds local images using composite keys and passes suffix/version build args.
RELEASE.mdDocuments base image policy and updates release process examples for new tags/keys.
README.mdUpdates user-facing docs and examples to the new tag/key scheme.
DockerfileSwitches to digest-only FROM rust@... and standardizes on OCI labels.
builds.schema.jsonRenames/validates Rust version fields to composite rust base keys.
builds.jsonMigrates stored rust digests and cli pairings to composite keys; updates defaults.
.github/workflows/release.ymlUpdates release workflow messaging to “rust base” terminology.
.github/workflows/publish.ymlThreads composite key/suffix through tagging, build args, artifacts, and metadata.
.github/workflows/build.ymlAdds concurrency cancellation for PRs and updates smoke build tag derivation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment threadRELEASE.md Outdated
Comment threadREADME.md Outdated
Comment threadREADME.md Outdated
Comment threadscripts/resolve-matrix.sh Outdated
Comment threadscripts/tag-names.sh Outdated
Comment threadREADME.md Outdated
Comment threadRELEASE.md Outdated
@fnando
fnando merged commit 1ddb0bd into mainMay 29, 2026
11 checks passed
@fnando
fnando deleted the image-base-defaults branch May 29, 2026 00:19
@github-project-automationgithub-project-automationBot moved this from Needs Review to Done in DevXMay 29, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Image base variant + version and switching defaults

3 participants

@fnando@leighmcculloch
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Document base image policy and switch defaults to slim trixie - #11

Merged
fnando merged 26 commits into
mainfrom
image-base-defaults
May 29, 2026
Merged

Document base image policy and switch defaults to slim trixie#11
fnando merged 26 commits into
mainfrom
image-base-defaults

Conversation

@fnando

@fnandofnando commented May 28, 2026

Copy link
Copy Markdown
Member

Closes#7.

What

  • Document a written base-image policy and switch the defaults to rust:<v>-slim-trixie.
  • Re-key builds.json so 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].
  • Dockerfile FROM lines now reference the base image by digest only — FROM rust@${RUST_IMAGE_DIGEST} — never by tag. Variant + Debian codename surface in OCI labels via a RUST_BASE_SUFFIX build-arg.
  • Thread the composite key through every consumer: 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 Dockerfile hard-coded slim-bookworm without a written rule, and bookworm is now Debian oldstable. The policy section in RELEASE.md now spells out:

  • Variant — use the slim upstream image. Non-slim SBOMs exceed the per-file size limit imposed by actions/attest, which fails the GitHub-native SBOM attestation step. The builder stage installs build-essential, ca-certificates, git, libssl-dev, and pkg-config explicitly because slim doesn't ship them.
  • Debian codename — track the Debian release used by the latest Ubuntu LTS (currently 26.04 → Debian 13 / trixie), so users on the prevailing LTS aren't running on a Debian newer than what their host's upstream tracks.
  • Tag — include variant + Debian in the image tag so future switches don't collide with the per-arch tag-immutability rule.

Notable details

  • Image tag format becomes <cli>-rust<rust>-[slim-]<debian>[-arch], mirroring the upstream Rust image's own naming.
  • The aliases job (:<cli>, :latest) is unchanged; it just resolves through the new composite default_rust value.
  • The FROM rust@<digest> form means a RUST_VERSION or RUST_BASE_SUFFIX drift can no longer silently disagree with the bytes the digest pulls.
  • build.yml gained a concurrency: block that cancels in-flight runs on PR pushes (main pushes still run to completion).
  • smoke-test-image.sh now cross-checks org.opencontainers.image.base.digest against the digest pinned in builds.json for the rust base key, and org.opencontainers.image.revision against the declared stellar-cli ref — so a build that quietly used a different upstream base or commit would fail the smoke test.
  • The image now carries only OCI standard labels (org.opencontainers.image.*); the previous org.stellar.* namespace was dropped because every value either duplicated an OCI label (stellar-cli-versionimage.version, stellar-cli-refimage.revision, rust-image-digestimage.base.digest) or was derivable from other on-image data (rust-version and rust-base-suffix from image.base.name; build-arch from the manifest's platform.architecture).
  • release-prepare.sh picks candidate rust base keys from Docker Hub's library/rust tag list, not rust-lang/rust's GitHub Releases. Rust toolchain releases ship to rust-lang/rust on GitHub the moment they're tagged, but the matching rust:<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 like 1.96.0-slim-trixie minutes before that tag exists on the registry. The local regex on the API response enforces the exact <x.y.z>-<suffix> shape, so an existing 1.96.0-trixie (different variant) or 1.96.0-slim-bookworm (different debian) won't get picked when the chosen suffix is slim-trixie.

End-to-end verification on a fork

Exercised the full pipeline against fnando/stellar-cli-docker with the new slim-trixie defaults and the Docker-Hub-driven picker:

  1. release workflow run — picker resolved to 1.94.1-slim-trixie + 1.95.0-slim-trixie (not 1.96.0-slim-trixie, because rust:1.96.0-slim-trixie hasn't been published by the docker-rust team yet despite rust-lang/rust releasing 1.96.0 earlier the same day). Staged builds.json, opened the release PR.
  2. Release PR #13 — reviewed and merged.
  3. GitHub Release v26.1.0 — published; the publish workflow enriched the body with per-arch digests + copy-paste-runnable verify commands.
  4. publish workflow 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 the actions/attest size limit cleanly on slim.
  5. Published images on Docker Hub at fnando/stellar-cli-experimental:
    • :26.1.0 (moving alias → 1.95.0-slim-trixie manifest list)
    • :26.1.0-rust1.94.1-slim-trixie, :26.1.0-rust1.95.0-slim-trixie (per-pair manifest lists)
    • Per-arch tags: :26.1.0-rust1.94.1-slim-trixie-amd64, …-arm64, :26.1.0-rust1.95.0-slim-trixie-amd64, …-arm64

Sample image labels

The labels on the freshly published 26.1.0-rust1.95.0-slim-trixie-arm64 image — 12 OCI standard labels, no custom namespace:

$ docker buildx imagetools inspect \
docker.io/fnando/stellar-cli-experimental:26.1.0-rust1.95.0-slim-trixie-arm64@sha256:7ea3f587bf32de569d2bb98852e8dddf785628ece7979d49c96cb8514b8b77c0 \
--format '{{ json .Image.Config.Labels }}' | jq .
{
"org.opencontainers.image.base.digest": "sha256:e14e87345b4d5964ddcc3491d27ee046a0f23820f340c3c1e24da6880141f7c0",
"org.opencontainers.image.base.name": "docker.io/library/rust:1.95.0-slim-trixie",
"org.opencontainers.image.created": "2026-05-28T20:36:13Z",
"org.opencontainers.image.description": "Stellar CLI image (SEP-58-compatible image for Stellar smart contracts).",
"org.opencontainers.image.documentation": "https://github.com/fnando/stellar-cli-docker",
"org.opencontainers.image.licenses": "Apache-2.0",
"org.opencontainers.image.revision": "1228cff8022b804659750b94b315932b0e0f3f6a",
"org.opencontainers.image.source": "https://github.com/fnando/stellar-cli-docker",
"org.opencontainers.image.title": "stellar-cli",
"org.opencontainers.image.url": "https://github.com/fnando/stellar-cli-docker",
"org.opencontainers.image.vendor": "Stellar Development Foundation",
"org.opencontainers.image.version": "26.1.0"
}

image.base.name carries the human-readable rust:1.95.0-slim-trixie (variant + Debian + version); image.base.digest is the multi-arch index digest pinned in builds.json; image.revision is 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-trixie builds 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 the image.base.digest cross-check against builds.json and the image.revision cross-check against the declared stellar-cli ref.
  • Inspected the upstream digests: all pinned digests resolve to application/vnd.oci.image.index.v1+json multi-arch indexes.

@fnando
fnando marked this pull request as ready for review May 28, 2026 20:59
CopilotAI review requested due to automatic review settings May 28, 2026 20:59
@fnandofnando self-assigned this May 28, 2026
@fnandofnando added this to DevXMay 28, 2026
@github-project-automationgithub-project-automationBot moved this to Backlog (Not Ready) in DevXMay 28, 2026
@fnandofnando moved this from Backlog (Not Ready) to Needs Review in DevXMay 28, 2026

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.json to 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
FileDescription
scripts/tag-names.shBuilds canonical tags using the composite Rust base key.
scripts/smoke-test-image.shValidates OCI labels and cross-checks base digest + cli revision.
scripts/resolve-matrix.shEmits workflow matrix rows including parsed version/suffix from composite key.
scripts/repro-test.shUpdates examples to reflect new tag format.
scripts/release-prepare.shPicks default Rust base keys from Docker Hub tag listings and threads suffix.
scripts/release-body.shGroups/sorts release metadata by composite key and bare Rust version.
scripts/refresh-rust-digests.shRefreshes pinned digests by inspecting rust:<key> upstream tags.
scripts/newest-pair.shReports newest (cli, rust base key) pairing.
scripts/lib/common.shAdds key parsing helpers and updates digest/pair resolution for composite keys.
scripts/build-image.shBuilds local images using composite keys and passes suffix/version build args.
RELEASE.mdDocuments base image policy and updates release process examples for new tags/keys.
README.mdUpdates user-facing docs and examples to the new tag/key scheme.
DockerfileSwitches to digest-only FROM rust@... and standardizes on OCI labels.
builds.schema.jsonRenames/validates Rust version fields to composite rust base keys.
builds.jsonMigrates stored rust digests and cli pairings to composite keys; updates defaults.
.github/workflows/release.ymlUpdates release workflow messaging to “rust base” terminology.
.github/workflows/publish.ymlThreads composite key/suffix through tagging, build args, artifacts, and metadata.
.github/workflows/build.ymlAdds concurrency cancellation for PRs and updates smoke build tag derivation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment threadRELEASE.md Outdated
Comment threadREADME.md Outdated
Comment threadREADME.md Outdated
Comment threadscripts/resolve-matrix.sh Outdated
Comment threadscripts/tag-names.sh Outdated
Comment threadREADME.md Outdated
Comment threadRELEASE.md Outdated
@fnando
fnando merged commit 1ddb0bd into mainMay 29, 2026
11 checks passed
@fnando
fnando deleted the image-base-defaults branch May 29, 2026 00:19
@github-project-automationgithub-project-automationBot moved this from Needs Review to Done in DevXMay 29, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Image base variant + version and switching defaults

3 participants

@fnando@leighmcculloch
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Document base image policy and switch defaults to slim trixie - #11

Merged
fnando merged 26 commits into
mainfrom
image-base-defaults
May 29, 2026
Merged

Document base image policy and switch defaults to slim trixie#11
fnando merged 26 commits into
mainfrom
image-base-defaults

Conversation

@fnando

@fnandofnando commented May 28, 2026

Copy link
Copy Markdown
Member

Closes#7.

What

  • Document a written base-image policy and switch the defaults to rust:<v>-slim-trixie.
  • Re-key builds.json so 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].
  • Dockerfile FROM lines now reference the base image by digest only — FROM rust@${RUST_IMAGE_DIGEST} — never by tag. Variant + Debian codename surface in OCI labels via a RUST_BASE_SUFFIX build-arg.
  • Thread the composite key through every consumer: 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 Dockerfile hard-coded slim-bookworm without a written rule, and bookworm is now Debian oldstable. The policy section in RELEASE.md now spells out:

  • Variant — use the slim upstream image. Non-slim SBOMs exceed the per-file size limit imposed by actions/attest, which fails the GitHub-native SBOM attestation step. The builder stage installs build-essential, ca-certificates, git, libssl-dev, and pkg-config explicitly because slim doesn't ship them.
  • Debian codename — track the Debian release used by the latest Ubuntu LTS (currently 26.04 → Debian 13 / trixie), so users on the prevailing LTS aren't running on a Debian newer than what their host's upstream tracks.
  • Tag — include variant + Debian in the image tag so future switches don't collide with the per-arch tag-immutability rule.

Notable details

  • Image tag format becomes <cli>-rust<rust>-[slim-]<debian>[-arch], mirroring the upstream Rust image's own naming.
  • The aliases job (:<cli>, :latest) is unchanged; it just resolves through the new composite default_rust value.
  • The FROM rust@<digest> form means a RUST_VERSION or RUST_BASE_SUFFIX drift can no longer silently disagree with the bytes the digest pulls.
  • build.yml gained a concurrency: block that cancels in-flight runs on PR pushes (main pushes still run to completion).
  • smoke-test-image.sh now cross-checks org.opencontainers.image.base.digest against the digest pinned in builds.json for the rust base key, and org.opencontainers.image.revision against the declared stellar-cli ref — so a build that quietly used a different upstream base or commit would fail the smoke test.
  • The image now carries only OCI standard labels (org.opencontainers.image.*); the previous org.stellar.* namespace was dropped because every value either duplicated an OCI label (stellar-cli-versionimage.version, stellar-cli-refimage.revision, rust-image-digestimage.base.digest) or was derivable from other on-image data (rust-version and rust-base-suffix from image.base.name; build-arch from the manifest's platform.architecture).
  • release-prepare.sh picks candidate rust base keys from Docker Hub's library/rust tag list, not rust-lang/rust's GitHub Releases. Rust toolchain releases ship to rust-lang/rust on GitHub the moment they're tagged, but the matching rust:<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 like 1.96.0-slim-trixie minutes before that tag exists on the registry. The local regex on the API response enforces the exact <x.y.z>-<suffix> shape, so an existing 1.96.0-trixie (different variant) or 1.96.0-slim-bookworm (different debian) won't get picked when the chosen suffix is slim-trixie.

End-to-end verification on a fork

Exercised the full pipeline against fnando/stellar-cli-docker with the new slim-trixie defaults and the Docker-Hub-driven picker:

  1. release workflow run — picker resolved to 1.94.1-slim-trixie + 1.95.0-slim-trixie (not 1.96.0-slim-trixie, because rust:1.96.0-slim-trixie hasn't been published by the docker-rust team yet despite rust-lang/rust releasing 1.96.0 earlier the same day). Staged builds.json, opened the release PR.
  2. Release PR #13 — reviewed and merged.
  3. GitHub Release v26.1.0 — published; the publish workflow enriched the body with per-arch digests + copy-paste-runnable verify commands.
  4. publish workflow 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 the actions/attest size limit cleanly on slim.
  5. Published images on Docker Hub at fnando/stellar-cli-experimental:
    • :26.1.0 (moving alias → 1.95.0-slim-trixie manifest list)
    • :26.1.0-rust1.94.1-slim-trixie, :26.1.0-rust1.95.0-slim-trixie (per-pair manifest lists)
    • Per-arch tags: :26.1.0-rust1.94.1-slim-trixie-amd64, …-arm64, :26.1.0-rust1.95.0-slim-trixie-amd64, …-arm64

Sample image labels

The labels on the freshly published 26.1.0-rust1.95.0-slim-trixie-arm64 image — 12 OCI standard labels, no custom namespace:

$ docker buildx imagetools inspect \
docker.io/fnando/stellar-cli-experimental:26.1.0-rust1.95.0-slim-trixie-arm64@sha256:7ea3f587bf32de569d2bb98852e8dddf785628ece7979d49c96cb8514b8b77c0 \
--format '{{ json .Image.Config.Labels }}' | jq .
{
"org.opencontainers.image.base.digest": "sha256:e14e87345b4d5964ddcc3491d27ee046a0f23820f340c3c1e24da6880141f7c0",
"org.opencontainers.image.base.name": "docker.io/library/rust:1.95.0-slim-trixie",
"org.opencontainers.image.created": "2026-05-28T20:36:13Z",
"org.opencontainers.image.description": "Stellar CLI image (SEP-58-compatible image for Stellar smart contracts).",
"org.opencontainers.image.documentation": "https://github.com/fnando/stellar-cli-docker",
"org.opencontainers.image.licenses": "Apache-2.0",
"org.opencontainers.image.revision": "1228cff8022b804659750b94b315932b0e0f3f6a",
"org.opencontainers.image.source": "https://github.com/fnando/stellar-cli-docker",
"org.opencontainers.image.title": "stellar-cli",
"org.opencontainers.image.url": "https://github.com/fnando/stellar-cli-docker",
"org.opencontainers.image.vendor": "Stellar Development Foundation",
"org.opencontainers.image.version": "26.1.0"
}

image.base.name carries the human-readable rust:1.95.0-slim-trixie (variant + Debian + version); image.base.digest is the multi-arch index digest pinned in builds.json; image.revision is 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-trixie builds 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 the image.base.digest cross-check against builds.json and the image.revision cross-check against the declared stellar-cli ref.
  • Inspected the upstream digests: all pinned digests resolve to application/vnd.oci.image.index.v1+json multi-arch indexes.

@fnando
fnando marked this pull request as ready for review May 28, 2026 20:59
CopilotAI review requested due to automatic review settings May 28, 2026 20:59
@fnandofnando self-assigned this May 28, 2026
@fnandofnando added this to DevXMay 28, 2026
@github-project-automationgithub-project-automationBot moved this to Backlog (Not Ready) in DevXMay 28, 2026
@fnandofnando moved this from Backlog (Not Ready) to Needs Review in DevXMay 28, 2026

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.json to 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
FileDescription
scripts/tag-names.shBuilds canonical tags using the composite Rust base key.
scripts/smoke-test-image.shValidates OCI labels and cross-checks base digest + cli revision.
scripts/resolve-matrix.shEmits workflow matrix rows including parsed version/suffix from composite key.
scripts/repro-test.shUpdates examples to reflect new tag format.
scripts/release-prepare.shPicks default Rust base keys from Docker Hub tag listings and threads suffix.
scripts/release-body.shGroups/sorts release metadata by composite key and bare Rust version.
scripts/refresh-rust-digests.shRefreshes pinned digests by inspecting rust:<key> upstream tags.
scripts/newest-pair.shReports newest (cli, rust base key) pairing.
scripts/lib/common.shAdds key parsing helpers and updates digest/pair resolution for composite keys.
scripts/build-image.shBuilds local images using composite keys and passes suffix/version build args.
RELEASE.mdDocuments base image policy and updates release process examples for new tags/keys.
README.mdUpdates user-facing docs and examples to the new tag/key scheme.
DockerfileSwitches to digest-only FROM rust@... and standardizes on OCI labels.
builds.schema.jsonRenames/validates Rust version fields to composite rust base keys.
builds.jsonMigrates stored rust digests and cli pairings to composite keys; updates defaults.
.github/workflows/release.ymlUpdates release workflow messaging to “rust base” terminology.
.github/workflows/publish.ymlThreads composite key/suffix through tagging, build args, artifacts, and metadata.
.github/workflows/build.ymlAdds concurrency cancellation for PRs and updates smoke build tag derivation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment threadRELEASE.md Outdated
Comment threadREADME.md Outdated
Comment threadREADME.md Outdated
Comment threadscripts/resolve-matrix.sh Outdated
Comment threadscripts/tag-names.sh Outdated
Comment threadREADME.md Outdated
Comment threadRELEASE.md Outdated
@fnando
fnando merged commit 1ddb0bd into mainMay 29, 2026
11 checks passed
@fnando
fnando deleted the image-base-defaults branch May 29, 2026 00:19
@github-project-automationgithub-project-automationBot moved this from Needs Review to Done in DevXMay 29, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Image base variant + version and switching defaults

3 participants

@fnando@leighmcculloch
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

Document base image policy and switch defaults to slim trixie - #11

Merged
fnando merged 26 commits into
mainfrom
image-base-defaults
May 29, 2026
Merged

Document base image policy and switch defaults to slim trixie#11
fnando merged 26 commits into
mainfrom
image-base-defaults

Conversation

@fnando

@fnandofnando commented May 28, 2026

Copy link
Copy Markdown
Member

Closes#7.

What

  • Document a written base-image policy and switch the defaults to rust:<v>-slim-trixie.
  • Re-key builds.json so 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].
  • Dockerfile FROM lines now reference the base image by digest only — FROM rust@${RUST_IMAGE_DIGEST} — never by tag. Variant + Debian codename surface in OCI labels via a RUST_BASE_SUFFIX build-arg.
  • Thread the composite key through every consumer: 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 Dockerfile hard-coded slim-bookworm without a written rule, and bookworm is now Debian oldstable. The policy section in RELEASE.md now spells out:

  • Variant — use the slim upstream image. Non-slim SBOMs exceed the per-file size limit imposed by actions/attest, which fails the GitHub-native SBOM attestation step. The builder stage installs build-essential, ca-certificates, git, libssl-dev, and pkg-config explicitly because slim doesn't ship them.
  • Debian codename — track the Debian release used by the latest Ubuntu LTS (currently 26.04 → Debian 13 / trixie), so users on the prevailing LTS aren't running on a Debian newer than what their host's upstream tracks.
  • Tag — include variant + Debian in the image tag so future switches don't collide with the per-arch tag-immutability rule.

Notable details

  • Image tag format becomes <cli>-rust<rust>-[slim-]<debian>[-arch], mirroring the upstream Rust image's own naming.
  • The aliases job (:<cli>, :latest) is unchanged; it just resolves through the new composite default_rust value.
  • The FROM rust@<digest> form means a RUST_VERSION or RUST_BASE_SUFFIX drift can no longer silently disagree with the bytes the digest pulls.
  • build.yml gained a concurrency: block that cancels in-flight runs on PR pushes (main pushes still run to completion).
  • smoke-test-image.sh now cross-checks org.opencontainers.image.base.digest against the digest pinned in builds.json for the rust base key, and org.opencontainers.image.revision against the declared stellar-cli ref — so a build that quietly used a different upstream base or commit would fail the smoke test.
  • The image now carries only OCI standard labels (org.opencontainers.image.*); the previous org.stellar.* namespace was dropped because every value either duplicated an OCI label (stellar-cli-versionimage.version, stellar-cli-refimage.revision, rust-image-digestimage.base.digest) or was derivable from other on-image data (rust-version and rust-base-suffix from image.base.name; build-arch from the manifest's platform.architecture).
  • release-prepare.sh picks candidate rust base keys from Docker Hub's library/rust tag list, not rust-lang/rust's GitHub Releases. Rust toolchain releases ship to rust-lang/rust on GitHub the moment they're tagged, but the matching rust:<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 like 1.96.0-slim-trixie minutes before that tag exists on the registry. The local regex on the API response enforces the exact <x.y.z>-<suffix> shape, so an existing 1.96.0-trixie (different variant) or 1.96.0-slim-bookworm (different debian) won't get picked when the chosen suffix is slim-trixie.

End-to-end verification on a fork

Exercised the full pipeline against fnando/stellar-cli-docker with the new slim-trixie defaults and the Docker-Hub-driven picker:

  1. release workflow run — picker resolved to 1.94.1-slim-trixie + 1.95.0-slim-trixie (not 1.96.0-slim-trixie, because rust:1.96.0-slim-trixie hasn't been published by the docker-rust team yet despite rust-lang/rust releasing 1.96.0 earlier the same day). Staged builds.json, opened the release PR.
  2. Release PR #13 — reviewed and merged.
  3. GitHub Release v26.1.0 — published; the publish workflow enriched the body with per-arch digests + copy-paste-runnable verify commands.
  4. publish workflow 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 the actions/attest size limit cleanly on slim.
  5. Published images on Docker Hub at fnando/stellar-cli-experimental:
    • :26.1.0 (moving alias → 1.95.0-slim-trixie manifest list)
    • :26.1.0-rust1.94.1-slim-trixie, :26.1.0-rust1.95.0-slim-trixie (per-pair manifest lists)
    • Per-arch tags: :26.1.0-rust1.94.1-slim-trixie-amd64, …-arm64, :26.1.0-rust1.95.0-slim-trixie-amd64, …-arm64

Sample image labels

The labels on the freshly published 26.1.0-rust1.95.0-slim-trixie-arm64 image — 12 OCI standard labels, no custom namespace:

$ docker buildx imagetools inspect \
docker.io/fnando/stellar-cli-experimental:26.1.0-rust1.95.0-slim-trixie-arm64@sha256:7ea3f587bf32de569d2bb98852e8dddf785628ece7979d49c96cb8514b8b77c0 \
--format '{{ json .Image.Config.Labels }}' | jq .
{
"org.opencontainers.image.base.digest": "sha256:e14e87345b4d5964ddcc3491d27ee046a0f23820f340c3c1e24da6880141f7c0",
"org.opencontainers.image.base.name": "docker.io/library/rust:1.95.0-slim-trixie",
"org.opencontainers.image.created": "2026-05-28T20:36:13Z",
"org.opencontainers.image.description": "Stellar CLI image (SEP-58-compatible image for Stellar smart contracts).",
"org.opencontainers.image.documentation": "https://github.com/fnando/stellar-cli-docker",
"org.opencontainers.image.licenses": "Apache-2.0",
"org.opencontainers.image.revision": "1228cff8022b804659750b94b315932b0e0f3f6a",
"org.opencontainers.image.source": "https://github.com/fnando/stellar-cli-docker",
"org.opencontainers.image.title": "stellar-cli",
"org.opencontainers.image.url": "https://github.com/fnando/stellar-cli-docker",
"org.opencontainers.image.vendor": "Stellar Development Foundation",
"org.opencontainers.image.version": "26.1.0"
}

image.base.name carries the human-readable rust:1.95.0-slim-trixie (variant + Debian + version); image.base.digest is the multi-arch index digest pinned in builds.json; image.revision is 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-trixie builds 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 the image.base.digest cross-check against builds.json and the image.revision cross-check against the declared stellar-cli ref.
  • Inspected the upstream digests: all pinned digests resolve to application/vnd.oci.image.index.v1+json multi-arch indexes.

@fnando
fnando marked this pull request as ready for review May 28, 2026 20:59
CopilotAI review requested due to automatic review settings May 28, 2026 20:59
@fnandofnando self-assigned this May 28, 2026
@fnandofnando added this to DevXMay 28, 2026
@github-project-automationgithub-project-automationBot moved this to Backlog (Not Ready) in DevXMay 28, 2026
@fnandofnando moved this from Backlog (Not Ready) to Needs Review in DevXMay 28, 2026

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.json to 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
FileDescription
scripts/tag-names.shBuilds canonical tags using the composite Rust base key.
scripts/smoke-test-image.shValidates OCI labels and cross-checks base digest + cli revision.
scripts/resolve-matrix.shEmits workflow matrix rows including parsed version/suffix from composite key.
scripts/repro-test.shUpdates examples to reflect new tag format.
scripts/release-prepare.shPicks default Rust base keys from Docker Hub tag listings and threads suffix.
scripts/release-body.shGroups/sorts release metadata by composite key and bare Rust version.
scripts/refresh-rust-digests.shRefreshes pinned digests by inspecting rust:<key> upstream tags.
scripts/newest-pair.shReports newest (cli, rust base key) pairing.
scripts/lib/common.shAdds key parsing helpers and updates digest/pair resolution for composite keys.
scripts/build-image.shBuilds local images using composite keys and passes suffix/version build args.
RELEASE.mdDocuments base image policy and updates release process examples for new tags/keys.
README.mdUpdates user-facing docs and examples to the new tag/key scheme.
DockerfileSwitches to digest-only FROM rust@... and standardizes on OCI labels.
builds.schema.jsonRenames/validates Rust version fields to composite rust base keys.
builds.jsonMigrates stored rust digests and cli pairings to composite keys; updates defaults.
.github/workflows/release.ymlUpdates release workflow messaging to “rust base” terminology.
.github/workflows/publish.ymlThreads composite key/suffix through tagging, build args, artifacts, and metadata.
.github/workflows/build.ymlAdds concurrency cancellation for PRs and updates smoke build tag derivation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment threadRELEASE.md Outdated
Comment threadREADME.md Outdated
Comment threadREADME.md Outdated
Comment threadscripts/resolve-matrix.sh Outdated
Comment threadscripts/tag-names.sh Outdated
Comment threadREADME.md Outdated
Comment threadRELEASE.md Outdated
@fnando
fnando merged commit 1ddb0bd into mainMay 29, 2026
11 checks passed
@fnando
fnando deleted the image-base-defaults branch May 29, 2026 00:19
@github-project-automationgithub-project-automationBot moved this from Needs Review to Done in DevXMay 29, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Image base variant + version and switching defaults

3 participants

@fnando@leighmcculloch
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Document base image policy and switch defaults to slim trixie - #11

Merged
fnando merged 26 commits into
mainfrom
image-base-defaults
May 29, 2026
Merged

Document base image policy and switch defaults to slim trixie#11
fnando merged 26 commits into
mainfrom
image-base-defaults

Conversation

@fnando

@fnandofnando commented May 28, 2026

Copy link
Copy Markdown
Member

Closes#7.

What

  • Document a written base-image policy and switch the defaults to rust:<v>-slim-trixie.
  • Re-key builds.json so 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].
  • Dockerfile FROM lines now reference the base image by digest only — FROM rust@${RUST_IMAGE_DIGEST} — never by tag. Variant + Debian codename surface in OCI labels via a RUST_BASE_SUFFIX build-arg.
  • Thread the composite key through every consumer: 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 Dockerfile hard-coded slim-bookworm without a written rule, and bookworm is now Debian oldstable. The policy section in RELEASE.md now spells out:

  • Variant — use the slim upstream image. Non-slim SBOMs exceed the per-file size limit imposed by actions/attest, which fails the GitHub-native SBOM attestation step. The builder stage installs build-essential, ca-certificates, git, libssl-dev, and pkg-config explicitly because slim doesn't ship them.
  • Debian codename — track the Debian release used by the latest Ubuntu LTS (currently 26.04 → Debian 13 / trixie), so users on the prevailing LTS aren't running on a Debian newer than what their host's upstream tracks.
  • Tag — include variant + Debian in the image tag so future switches don't collide with the per-arch tag-immutability rule.

Notable details

  • Image tag format becomes <cli>-rust<rust>-[slim-]<debian>[-arch], mirroring the upstream Rust image's own naming.
  • The aliases job (:<cli>, :latest) is unchanged; it just resolves through the new composite default_rust value.
  • The FROM rust@<digest> form means a RUST_VERSION or RUST_BASE_SUFFIX drift can no longer silently disagree with the bytes the digest pulls.
  • build.yml gained a concurrency: block that cancels in-flight runs on PR pushes (main pushes still run to completion).
  • smoke-test-image.sh now cross-checks org.opencontainers.image.base.digest against the digest pinned in builds.json for the rust base key, and org.opencontainers.image.revision against the declared stellar-cli ref — so a build that quietly used a different upstream base or commit would fail the smoke test.
  • The image now carries only OCI standard labels (org.opencontainers.image.*); the previous org.stellar.* namespace was dropped because every value either duplicated an OCI label (stellar-cli-versionimage.version, stellar-cli-refimage.revision, rust-image-digestimage.base.digest) or was derivable from other on-image data (rust-version and rust-base-suffix from image.base.name; build-arch from the manifest's platform.architecture).
  • release-prepare.sh picks candidate rust base keys from Docker Hub's library/rust tag list, not rust-lang/rust's GitHub Releases. Rust toolchain releases ship to rust-lang/rust on GitHub the moment they're tagged, but the matching rust:<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 like 1.96.0-slim-trixie minutes before that tag exists on the registry. The local regex on the API response enforces the exact <x.y.z>-<suffix> shape, so an existing 1.96.0-trixie (different variant) or 1.96.0-slim-bookworm (different debian) won't get picked when the chosen suffix is slim-trixie.

End-to-end verification on a fork

Exercised the full pipeline against fnando/stellar-cli-docker with the new slim-trixie defaults and the Docker-Hub-driven picker:

  1. release workflow run — picker resolved to 1.94.1-slim-trixie + 1.95.0-slim-trixie (not 1.96.0-slim-trixie, because rust:1.96.0-slim-trixie hasn't been published by the docker-rust team yet despite rust-lang/rust releasing 1.96.0 earlier the same day). Staged builds.json, opened the release PR.
  2. Release PR #13 — reviewed and merged.
  3. GitHub Release v26.1.0 — published; the publish workflow enriched the body with per-arch digests + copy-paste-runnable verify commands.
  4. publish workflow 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 the actions/attest size limit cleanly on slim.
  5. Published images on Docker Hub at fnando/stellar-cli-experimental:
    • :26.1.0 (moving alias → 1.95.0-slim-trixie manifest list)
    • :26.1.0-rust1.94.1-slim-trixie, :26.1.0-rust1.95.0-slim-trixie (per-pair manifest lists)
    • Per-arch tags: :26.1.0-rust1.94.1-slim-trixie-amd64, …-arm64, :26.1.0-rust1.95.0-slim-trixie-amd64, …-arm64

Sample image labels

The labels on the freshly published 26.1.0-rust1.95.0-slim-trixie-arm64 image — 12 OCI standard labels, no custom namespace:

$ docker buildx imagetools inspect \
docker.io/fnando/stellar-cli-experimental:26.1.0-rust1.95.0-slim-trixie-arm64@sha256:7ea3f587bf32de569d2bb98852e8dddf785628ece7979d49c96cb8514b8b77c0 \
--format '{{ json .Image.Config.Labels }}' | jq .
{
"org.opencontainers.image.base.digest": "sha256:e14e87345b4d5964ddcc3491d27ee046a0f23820f340c3c1e24da6880141f7c0",
"org.opencontainers.image.base.name": "docker.io/library/rust:1.95.0-slim-trixie",
"org.opencontainers.image.created": "2026-05-28T20:36:13Z",
"org.opencontainers.image.description": "Stellar CLI image (SEP-58-compatible image for Stellar smart contracts).",
"org.opencontainers.image.documentation": "https://github.com/fnando/stellar-cli-docker",
"org.opencontainers.image.licenses": "Apache-2.0",
"org.opencontainers.image.revision": "1228cff8022b804659750b94b315932b0e0f3f6a",
"org.opencontainers.image.source": "https://github.com/fnando/stellar-cli-docker",
"org.opencontainers.image.title": "stellar-cli",
"org.opencontainers.image.url": "https://github.com/fnando/stellar-cli-docker",
"org.opencontainers.image.vendor": "Stellar Development Foundation",
"org.opencontainers.image.version": "26.1.0"
}

image.base.name carries the human-readable rust:1.95.0-slim-trixie (variant + Debian + version); image.base.digest is the multi-arch index digest pinned in builds.json; image.revision is 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-trixie builds 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 the image.base.digest cross-check against builds.json and the image.revision cross-check against the declared stellar-cli ref.
  • Inspected the upstream digests: all pinned digests resolve to application/vnd.oci.image.index.v1+json multi-arch indexes.

@fnando
fnando marked this pull request as ready for review May 28, 2026 20:59
CopilotAI review requested due to automatic review settings May 28, 2026 20:59
@fnandofnando self-assigned this May 28, 2026
@fnandofnando added this to DevXMay 28, 2026
@github-project-automationgithub-project-automationBot moved this to Backlog (Not Ready) in DevXMay 28, 2026
@fnandofnando moved this from Backlog (Not Ready) to Needs Review in DevXMay 28, 2026

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.json to 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
FileDescription
scripts/tag-names.shBuilds canonical tags using the composite Rust base key.
scripts/smoke-test-image.shValidates OCI labels and cross-checks base digest + cli revision.
scripts/resolve-matrix.shEmits workflow matrix rows including parsed version/suffix from composite key.
scripts/repro-test.shUpdates examples to reflect new tag format.
scripts/release-prepare.shPicks default Rust base keys from Docker Hub tag listings and threads suffix.
scripts/release-body.shGroups/sorts release metadata by composite key and bare Rust version.
scripts/refresh-rust-digests.shRefreshes pinned digests by inspecting rust:<key> upstream tags.
scripts/newest-pair.shReports newest (cli, rust base key) pairing.
scripts/lib/common.shAdds key parsing helpers and updates digest/pair resolution for composite keys.
scripts/build-image.shBuilds local images using composite keys and passes suffix/version build args.
RELEASE.mdDocuments base image policy and updates release process examples for new tags/keys.
README.mdUpdates user-facing docs and examples to the new tag/key scheme.
DockerfileSwitches to digest-only FROM rust@... and standardizes on OCI labels.
builds.schema.jsonRenames/validates Rust version fields to composite rust base keys.
builds.jsonMigrates stored rust digests and cli pairings to composite keys; updates defaults.
.github/workflows/release.ymlUpdates release workflow messaging to “rust base” terminology.
.github/workflows/publish.ymlThreads composite key/suffix through tagging, build args, artifacts, and metadata.
.github/workflows/build.ymlAdds concurrency cancellation for PRs and updates smoke build tag derivation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment threadRELEASE.md Outdated
Comment threadREADME.md Outdated
Comment threadREADME.md Outdated
Comment threadscripts/resolve-matrix.sh Outdated
Comment threadscripts/tag-names.sh Outdated
Comment threadREADME.md Outdated
Comment threadRELEASE.md Outdated
@fnando
fnando merged commit 1ddb0bd into mainMay 29, 2026
11 checks passed
@fnando
fnando deleted the image-base-defaults branch May 29, 2026 00:19
@github-project-automationgithub-project-automationBot moved this from Needs Review to Done in DevXMay 29, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Image base variant + version and switching defaults

3 participants

@fnando@leighmcculloch
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Document base image policy and switch defaults to slim trixie - #11

Merged
fnando merged 26 commits into
mainfrom
image-base-defaults
May 29, 2026
Merged

Document base image policy and switch defaults to slim trixie#11
fnando merged 26 commits into
mainfrom
image-base-defaults

Conversation

@fnando

@fnandofnando commented May 28, 2026

Copy link
Copy Markdown
Member

Closes#7.

What

  • Document a written base-image policy and switch the defaults to rust:<v>-slim-trixie.
  • Re-key builds.json so 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].
  • Dockerfile FROM lines now reference the base image by digest only — FROM rust@${RUST_IMAGE_DIGEST} — never by tag. Variant + Debian codename surface in OCI labels via a RUST_BASE_SUFFIX build-arg.
  • Thread the composite key through every consumer: 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 Dockerfile hard-coded slim-bookworm without a written rule, and bookworm is now Debian oldstable. The policy section in RELEASE.md now spells out:

  • Variant — use the slim upstream image. Non-slim SBOMs exceed the per-file size limit imposed by actions/attest, which fails the GitHub-native SBOM attestation step. The builder stage installs build-essential, ca-certificates, git, libssl-dev, and pkg-config explicitly because slim doesn't ship them.
  • Debian codename — track the Debian release used by the latest Ubuntu LTS (currently 26.04 → Debian 13 / trixie), so users on the prevailing LTS aren't running on a Debian newer than what their host's upstream tracks.
  • Tag — include variant + Debian in the image tag so future switches don't collide with the per-arch tag-immutability rule.

Notable details

  • Image tag format becomes <cli>-rust<rust>-[slim-]<debian>[-arch], mirroring the upstream Rust image's own naming.
  • The aliases job (:<cli>, :latest) is unchanged; it just resolves through the new composite default_rust value.
  • The FROM rust@<digest> form means a RUST_VERSION or RUST_BASE_SUFFIX drift can no longer silently disagree with the bytes the digest pulls.
  • build.yml gained a concurrency: block that cancels in-flight runs on PR pushes (main pushes still run to completion).
  • smoke-test-image.sh now cross-checks org.opencontainers.image.base.digest against the digest pinned in builds.json for the rust base key, and org.opencontainers.image.revision against the declared stellar-cli ref — so a build that quietly used a different upstream base or commit would fail the smoke test.
  • The image now carries only OCI standard labels (org.opencontainers.image.*); the previous org.stellar.* namespace was dropped because every value either duplicated an OCI label (stellar-cli-versionimage.version, stellar-cli-refimage.revision, rust-image-digestimage.base.digest) or was derivable from other on-image data (rust-version and rust-base-suffix from image.base.name; build-arch from the manifest's platform.architecture).
  • release-prepare.sh picks candidate rust base keys from Docker Hub's library/rust tag list, not rust-lang/rust's GitHub Releases. Rust toolchain releases ship to rust-lang/rust on GitHub the moment they're tagged, but the matching rust:<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 like 1.96.0-slim-trixie minutes before that tag exists on the registry. The local regex on the API response enforces the exact <x.y.z>-<suffix> shape, so an existing 1.96.0-trixie (different variant) or 1.96.0-slim-bookworm (different debian) won't get picked when the chosen suffix is slim-trixie.

End-to-end verification on a fork

Exercised the full pipeline against fnando/stellar-cli-docker with the new slim-trixie defaults and the Docker-Hub-driven picker:

  1. release workflow run — picker resolved to 1.94.1-slim-trixie + 1.95.0-slim-trixie (not 1.96.0-slim-trixie, because rust:1.96.0-slim-trixie hasn't been published by the docker-rust team yet despite rust-lang/rust releasing 1.96.0 earlier the same day). Staged builds.json, opened the release PR.
  2. Release PR #13 — reviewed and merged.
  3. GitHub Release v26.1.0 — published; the publish workflow enriched the body with per-arch digests + copy-paste-runnable verify commands.
  4. publish workflow 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 the actions/attest size limit cleanly on slim.
  5. Published images on Docker Hub at fnando/stellar-cli-experimental:
    • :26.1.0 (moving alias → 1.95.0-slim-trixie manifest list)
    • :26.1.0-rust1.94.1-slim-trixie, :26.1.0-rust1.95.0-slim-trixie (per-pair manifest lists)
    • Per-arch tags: :26.1.0-rust1.94.1-slim-trixie-amd64, …-arm64, :26.1.0-rust1.95.0-slim-trixie-amd64, …-arm64

Sample image labels

The labels on the freshly published 26.1.0-rust1.95.0-slim-trixie-arm64 image — 12 OCI standard labels, no custom namespace:

$ docker buildx imagetools inspect \
docker.io/fnando/stellar-cli-experimental:26.1.0-rust1.95.0-slim-trixie-arm64@sha256:7ea3f587bf32de569d2bb98852e8dddf785628ece7979d49c96cb8514b8b77c0 \
--format '{{ json .Image.Config.Labels }}' | jq .
{
"org.opencontainers.image.base.digest": "sha256:e14e87345b4d5964ddcc3491d27ee046a0f23820f340c3c1e24da6880141f7c0",
"org.opencontainers.image.base.name": "docker.io/library/rust:1.95.0-slim-trixie",
"org.opencontainers.image.created": "2026-05-28T20:36:13Z",
"org.opencontainers.image.description": "Stellar CLI image (SEP-58-compatible image for Stellar smart contracts).",
"org.opencontainers.image.documentation": "https://github.com/fnando/stellar-cli-docker",
"org.opencontainers.image.licenses": "Apache-2.0",
"org.opencontainers.image.revision": "1228cff8022b804659750b94b315932b0e0f3f6a",
"org.opencontainers.image.source": "https://github.com/fnando/stellar-cli-docker",
"org.opencontainers.image.title": "stellar-cli",
"org.opencontainers.image.url": "https://github.com/fnando/stellar-cli-docker",
"org.opencontainers.image.vendor": "Stellar Development Foundation",
"org.opencontainers.image.version": "26.1.0"
}

image.base.name carries the human-readable rust:1.95.0-slim-trixie (variant + Debian + version); image.base.digest is the multi-arch index digest pinned in builds.json; image.revision is 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-trixie builds 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 the image.base.digest cross-check against builds.json and the image.revision cross-check against the declared stellar-cli ref.
  • Inspected the upstream digests: all pinned digests resolve to application/vnd.oci.image.index.v1+json multi-arch indexes.

@fnando
fnando marked this pull request as ready for review May 28, 2026 20:59
CopilotAI review requested due to automatic review settings May 28, 2026 20:59
@fnandofnando self-assigned this May 28, 2026
@fnandofnando added this to DevXMay 28, 2026
@github-project-automationgithub-project-automationBot moved this to Backlog (Not Ready) in DevXMay 28, 2026
@fnandofnando moved this from Backlog (Not Ready) to Needs Review in DevXMay 28, 2026

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.json to 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
FileDescription
scripts/tag-names.shBuilds canonical tags using the composite Rust base key.
scripts/smoke-test-image.shValidates OCI labels and cross-checks base digest + cli revision.
scripts/resolve-matrix.shEmits workflow matrix rows including parsed version/suffix from composite key.
scripts/repro-test.shUpdates examples to reflect new tag format.
scripts/release-prepare.shPicks default Rust base keys from Docker Hub tag listings and threads suffix.
scripts/release-body.shGroups/sorts release metadata by composite key and bare Rust version.
scripts/refresh-rust-digests.shRefreshes pinned digests by inspecting rust:<key> upstream tags.
scripts/newest-pair.shReports newest (cli, rust base key) pairing.
scripts/lib/common.shAdds key parsing helpers and updates digest/pair resolution for composite keys.
scripts/build-image.shBuilds local images using composite keys and passes suffix/version build args.
RELEASE.mdDocuments base image policy and updates release process examples for new tags/keys.
README.mdUpdates user-facing docs and examples to the new tag/key scheme.
DockerfileSwitches to digest-only FROM rust@... and standardizes on OCI labels.
builds.schema.jsonRenames/validates Rust version fields to composite rust base keys.
builds.jsonMigrates stored rust digests and cli pairings to composite keys; updates defaults.
.github/workflows/release.ymlUpdates release workflow messaging to “rust base” terminology.
.github/workflows/publish.ymlThreads composite key/suffix through tagging, build args, artifacts, and metadata.
.github/workflows/build.ymlAdds concurrency cancellation for PRs and updates smoke build tag derivation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment threadRELEASE.md Outdated
Comment threadREADME.md Outdated
Comment threadREADME.md Outdated
Comment threadscripts/resolve-matrix.sh Outdated
Comment threadscripts/tag-names.sh Outdated
Comment threadREADME.md Outdated
Comment threadRELEASE.md Outdated
@fnando
fnando merged commit 1ddb0bd into mainMay 29, 2026
11 checks passed
@fnando
fnando deleted the image-base-defaults branch May 29, 2026 00:19
@github-project-automationgithub-project-automationBot moved this from Needs Review to Done in DevXMay 29, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Image base variant + version and switching defaults

3 participants

@fnando@leighmcculloch
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

Document base image policy and switch defaults to slim trixie - #11

Merged
fnando merged 26 commits into
mainfrom
image-base-defaults
May 29, 2026
Merged

Document base image policy and switch defaults to slim trixie#11
fnando merged 26 commits into
mainfrom
image-base-defaults

Conversation

@fnando

@fnandofnando commented May 28, 2026

Copy link
Copy Markdown
Member

Closes#7.

What

  • Document a written base-image policy and switch the defaults to rust:<v>-slim-trixie.
  • Re-key builds.json so 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].
  • Dockerfile FROM lines now reference the base image by digest only — FROM rust@${RUST_IMAGE_DIGEST} — never by tag. Variant + Debian codename surface in OCI labels via a RUST_BASE_SUFFIX build-arg.
  • Thread the composite key through every consumer: 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 Dockerfile hard-coded slim-bookworm without a written rule, and bookworm is now Debian oldstable. The policy section in RELEASE.md now spells out:

  • Variant — use the slim upstream image. Non-slim SBOMs exceed the per-file size limit imposed by actions/attest, which fails the GitHub-native SBOM attestation step. The builder stage installs build-essential, ca-certificates, git, libssl-dev, and pkg-config explicitly because slim doesn't ship them.
  • Debian codename — track the Debian release used by the latest Ubuntu LTS (currently 26.04 → Debian 13 / trixie), so users on the prevailing LTS aren't running on a Debian newer than what their host's upstream tracks.
  • Tag — include variant + Debian in the image tag so future switches don't collide with the per-arch tag-immutability rule.

Notable details

  • Image tag format becomes <cli>-rust<rust>-[slim-]<debian>[-arch], mirroring the upstream Rust image's own naming.
  • The aliases job (:<cli>, :latest) is unchanged; it just resolves through the new composite default_rust value.
  • The FROM rust@<digest> form means a RUST_VERSION or RUST_BASE_SUFFIX drift can no longer silently disagree with the bytes the digest pulls.
  • build.yml gained a concurrency: block that cancels in-flight runs on PR pushes (main pushes still run to completion).
  • smoke-test-image.sh now cross-checks org.opencontainers.image.base.digest against the digest pinned in builds.json for the rust base key, and org.opencontainers.image.revision against the declared stellar-cli ref — so a build that quietly used a different upstream base or commit would fail the smoke test.
  • The image now carries only OCI standard labels (org.opencontainers.image.*); the previous org.stellar.* namespace was dropped because every value either duplicated an OCI label (stellar-cli-versionimage.version, stellar-cli-refimage.revision, rust-image-digestimage.base.digest) or was derivable from other on-image data (rust-version and rust-base-suffix from image.base.name; build-arch from the manifest's platform.architecture).
  • release-prepare.sh picks candidate rust base keys from Docker Hub's library/rust tag list, not rust-lang/rust's GitHub Releases. Rust toolchain releases ship to rust-lang/rust on GitHub the moment they're tagged, but the matching rust:<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 like 1.96.0-slim-trixie minutes before that tag exists on the registry. The local regex on the API response enforces the exact <x.y.z>-<suffix> shape, so an existing 1.96.0-trixie (different variant) or 1.96.0-slim-bookworm (different debian) won't get picked when the chosen suffix is slim-trixie.

End-to-end verification on a fork

Exercised the full pipeline against fnando/stellar-cli-docker with the new slim-trixie defaults and the Docker-Hub-driven picker:

  1. release workflow run — picker resolved to 1.94.1-slim-trixie + 1.95.0-slim-trixie (not 1.96.0-slim-trixie, because rust:1.96.0-slim-trixie hasn't been published by the docker-rust team yet despite rust-lang/rust releasing 1.96.0 earlier the same day). Staged builds.json, opened the release PR.
  2. Release PR #13 — reviewed and merged.
  3. GitHub Release v26.1.0 — published; the publish workflow enriched the body with per-arch digests + copy-paste-runnable verify commands.
  4. publish workflow 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 the actions/attest size limit cleanly on slim.
  5. Published images on Docker Hub at fnando/stellar-cli-experimental:
    • :26.1.0 (moving alias → 1.95.0-slim-trixie manifest list)
    • :26.1.0-rust1.94.1-slim-trixie, :26.1.0-rust1.95.0-slim-trixie (per-pair manifest lists)
    • Per-arch tags: :26.1.0-rust1.94.1-slim-trixie-amd64, …-arm64, :26.1.0-rust1.95.0-slim-trixie-amd64, …-arm64

Sample image labels

The labels on the freshly published 26.1.0-rust1.95.0-slim-trixie-arm64 image — 12 OCI standard labels, no custom namespace:

$ docker buildx imagetools inspect \
docker.io/fnando/stellar-cli-experimental:26.1.0-rust1.95.0-slim-trixie-arm64@sha256:7ea3f587bf32de569d2bb98852e8dddf785628ece7979d49c96cb8514b8b77c0 \
--format '{{ json .Image.Config.Labels }}' | jq .
{
"org.opencontainers.image.base.digest": "sha256:e14e87345b4d5964ddcc3491d27ee046a0f23820f340c3c1e24da6880141f7c0",
"org.opencontainers.image.base.name": "docker.io/library/rust:1.95.0-slim-trixie",
"org.opencontainers.image.created": "2026-05-28T20:36:13Z",
"org.opencontainers.image.description": "Stellar CLI image (SEP-58-compatible image for Stellar smart contracts).",
"org.opencontainers.image.documentation": "https://github.com/fnando/stellar-cli-docker",
"org.opencontainers.image.licenses": "Apache-2.0",
"org.opencontainers.image.revision": "1228cff8022b804659750b94b315932b0e0f3f6a",
"org.opencontainers.image.source": "https://github.com/fnando/stellar-cli-docker",
"org.opencontainers.image.title": "stellar-cli",
"org.opencontainers.image.url": "https://github.com/fnando/stellar-cli-docker",
"org.opencontainers.image.vendor": "Stellar Development Foundation",
"org.opencontainers.image.version": "26.1.0"
}

image.base.name carries the human-readable rust:1.95.0-slim-trixie (variant + Debian + version); image.base.digest is the multi-arch index digest pinned in builds.json; image.revision is 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-trixie builds 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 the image.base.digest cross-check against builds.json and the image.revision cross-check against the declared stellar-cli ref.
  • Inspected the upstream digests: all pinned digests resolve to application/vnd.oci.image.index.v1+json multi-arch indexes.

@fnando
fnando marked this pull request as ready for review May 28, 2026 20:59
CopilotAI review requested due to automatic review settings May 28, 2026 20:59
@fnandofnando self-assigned this May 28, 2026
@fnandofnando added this to DevXMay 28, 2026
@github-project-automationgithub-project-automationBot moved this to Backlog (Not Ready) in DevXMay 28, 2026
@fnandofnando moved this from Backlog (Not Ready) to Needs Review in DevXMay 28, 2026

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.json to 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
FileDescription
scripts/tag-names.shBuilds canonical tags using the composite Rust base key.
scripts/smoke-test-image.shValidates OCI labels and cross-checks base digest + cli revision.
scripts/resolve-matrix.shEmits workflow matrix rows including parsed version/suffix from composite key.
scripts/repro-test.shUpdates examples to reflect new tag format.
scripts/release-prepare.shPicks default Rust base keys from Docker Hub tag listings and threads suffix.
scripts/release-body.shGroups/sorts release metadata by composite key and bare Rust version.
scripts/refresh-rust-digests.shRefreshes pinned digests by inspecting rust:<key> upstream tags.
scripts/newest-pair.shReports newest (cli, rust base key) pairing.
scripts/lib/common.shAdds key parsing helpers and updates digest/pair resolution for composite keys.
scripts/build-image.shBuilds local images using composite keys and passes suffix/version build args.
RELEASE.mdDocuments base image policy and updates release process examples for new tags/keys.
README.mdUpdates user-facing docs and examples to the new tag/key scheme.
DockerfileSwitches to digest-only FROM rust@... and standardizes on OCI labels.
builds.schema.jsonRenames/validates Rust version fields to composite rust base keys.
builds.jsonMigrates stored rust digests and cli pairings to composite keys; updates defaults.
.github/workflows/release.ymlUpdates release workflow messaging to “rust base” terminology.
.github/workflows/publish.ymlThreads composite key/suffix through tagging, build args, artifacts, and metadata.
.github/workflows/build.ymlAdds concurrency cancellation for PRs and updates smoke build tag derivation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment threadRELEASE.md Outdated
Comment threadREADME.md Outdated
Comment threadREADME.md Outdated
Comment threadscripts/resolve-matrix.sh Outdated
Comment threadscripts/tag-names.sh Outdated
Comment threadREADME.md Outdated
Comment threadRELEASE.md Outdated
@fnando
fnando merged commit 1ddb0bd into mainMay 29, 2026
11 checks passed
@fnando
fnando deleted the image-base-defaults branch May 29, 2026 00:19
@github-project-automationgithub-project-automationBot moved this from Needs Review to Done in DevXMay 29, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Image base variant + version and switching defaults

3 participants

@fnando@leighmcculloch