Repository navigation
feat(release): ship the decdn CLI as a container image - #2398
Conversation
Releases publish a second image, ghcr.io/decdn/decdn (mirrored to docker.io/decdn/decdn), with `decdn` as entrypoint. The decdn-node image also carries the CLI, so `docker exec <container> decdn node status` reaches the daemon's loopback admin port. - Dockerfile: base -> decdn -> decdn-node stages; node stays the default target and both copy binaries from the signed Linux release archives. - release.yml: the docker job is a two-leg matrix with per-image cache scope, SBOM (<stage>-<version>-sbom.spdx.json) and digest file (<stage>-image-digest.txt); it fails on empty binaries or digest. - sign-release.sh: signs and promotes both images (GHCR first, then Docker Hub), refuses a DECDN_DOCKERHUB_REPO ending in -node, reports every repository already promoted on failure, and refuses to publish while a promoted repository is not anonymously pullable. - check-image-name.sh checks target/image pairs and the IMAGES list; CI's docker-build checks both entrypoints and default CMDs; the Trivy scan covers both images and fails on errors other than not-found. - Docs: README, SECURITY, RELEASING (new public-package setup step), KEYS, ADR binaries appendix, crate READMEs, CHANGELOG. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
🔵 Needs a closer look
The supply-chain workflow has broad release impact and cannot run end-to-end until a tag is pushed.
0 open findings
What changed in this PR
Adds a standalone decdn CLI container while bundling the CLI into the node image.
Changes:
- Adds two-stage container builds and CI validation.
- Extends release signing, promotion, SBOM, and scanning workflows.
- Updates distribution and verification documentation.
| File | Description |
|---|---|
Dockerfile |
Defines CLI and node image stages. |
.github/workflows/release.yml |
Builds and publishes both images. |
.github/workflows/ci.yml |
Validates both image contracts. |
.github/workflows/security.yml |
Scans both published images. |
.github/scripts/sign-release.sh |
Signs and promotes both images. |
.github/scripts/check-image-name.sh |
Checks image-name consistency. |
SECURITY.md |
Documents verification for both images. |
RELEASING.md |
Updates the release procedure. |
README.md |
Documents container installation and usage. |
KEYS |
Updates signed-artifact wording. |
CHANGELOG.md |
Records the breaking release changes. |
adr/appendix-binaries.md |
Updates the distribution architecture. |
crates/node/README.md |
Documents the bundled CLI. |
crates/cli/README.md |
Documents the CLI image. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Code Coverage OverviewLanguages: Rust, Solidity Rust / code-coverage/cargo-llvm-covThe overall line coverage in commit c23d8c9 in the Show a line coverage summary of the most impacted files.
Solidity / code-coverage/forgeThe overall line coverage in commit c23d8c9 in the Updated |
Gas snapshotNo gas changes vs base. |
What
Ships the
decdnCLI as a container image, and adds it to the node image.ghcr.io/decdn/decdn/docker.io/decdn/decdn: CLI only,ENTRYPOINT ["decdn"],CMD ["--help"], volume at/home/decdn/.decdn.decdn-nodeimage now also contains/usr/local/bin/decdn, sodocker exec <container> decdn node statusreaches the loopback admin port.Both are stages of one
Dockerfile(base→decdn→decdn-node, node last sodocker build .is unchanged) and copy binaries from the signed Linux release archives, as before.Release plumbing:
release.ymldockerjob → two-leg matrix; per-image gha cache scope, SBOM<stage>-<version>-sbom.spdx.json, digest<stage>-image-digest.txt.sign-release.shsignsSHA256SUMS+ both digests + both SBOMs, promotes GHCR then Docker Hub, refuses aDECDN_DOCKERHUB_REPOending in-node(its meaning is now the base repo), lists every already-promoted repo on failure, and refuses to publish while any promoted repo is not anonymously pullable.check-image-name.shchecks each matrixtarget:/image:pair and theIMAGESlist; CIdocker-buildchecks both entrypoints and default CMDs; Trivy scans both images and fails on errors other than not-found.Reviewer notes
image-digest.txt→decdn-node-image-digest.txt+decdn-image-digest.txt; node SBOM →decdn-node-<v>-sbom.spdx.json;decdn-<v>-sbom.spdx.jsonnow describes the CLI image. In CHANGELOG.decdn/decdn; after the first run, make the new GHCR package public. Note the existingghcr.io/decdn/decdn-nodepackage is currently private — anonymous pulls of v0.0.1 fail; the new pre-publish check would catch this.DECDN_REPO=<fork>rehearsal) is its first end-to-end run.[Unreleased]still says "no versioned tag yet" although v0.0.1 shipped.Verification
Built both images from the real v0.0.1 Linux binaries:
--versionfor both images and fordecdninside the node image;key-gen/whoamithrough the volume, including--user <other uid> -e HOME=/home/decdn; in-imagesha256summatches the archives (the SECURITY.md check).sign-release.shdigest validation and promotion run against a stubdocker: stable, prerelease, fork, wrong digest file, leftover-nodeHub repo, Docker Hub failure mid-mirror, private package, both skip flags.check-image-name.shfails on swappedimage:lines, a stage dropped fromIMAGES, a renamed target.CI
docker-buildsteps run locally; removingCMD ["run"]makes the check fail.Trivy existence check run against an existing image, a missing tag, and an anonymous lookup.
docker buildx build --checkfor both targets; shellcheck; actionlint (onlyci.yml's three findings already onmain);uvx --with pyyaml pytest .github/scripts/tests(170 passed);pre-commit runon changed files.cargo fmt -- --check— n/a, no Rust changesCARGO_BUILD_WARNINGS=deny cargo clippy --workspace --all-targets --all-features— n/acargo nextest run— n/acontracts/changed — n/aUser-visible change:
CHANGELOG.mdentry addedDesign change: ADR in
adr/added or updated (appendix-binaries.md§ Distribution)PR title uses an allowed type with a lowercase subject
🤖 Generated with Claude Code