Promote immutable image releases
A release is an approved combination of source, artifact and evidence. Instead of rebuilding the same source separately for staging and production, promote the tested image by its immutable digest. Human-readable tags help people navigate releases; the digest identifies the manifest or index actually selected.
Worked example
Work offline: the scenarios and evidence are synthetic. Do not run hosted workflows, contact registries, use real credentials or deploy anything for this lesson. Keep the exercise offline. Before any separately authorized runtime check, verify the effective daemon, builder, runner or deployment identity as applicable; use synthetic data, reviewed inputs and bounded resources. Record missing evidence as NOT RUN.
Fictional release ledger (A and B are symbolic digests)Commit 42 -> image A -> tests passed -> staging A -> approved production ACommit 43 -> image B -> tests pending -> no promotionlatest -> B (mutable label)Production desired artifact -> A (immutable identity)Imagine staging used A but a deployment script later resolves latest to B. The script deploys something that did not pass staging. Instead, capture the full digest emitted by an approved registry publication, store it with the commit and test records, and refer to registry.example.invalid/team/app@sha256:<verified-digest> (illustrative, not a runnable address). Verify the registry still retains the artifact and each target platform is present. For multi-platform builds, decide whether the index digest or a platform-specific manifest digest is the release identity and check the matching evidence. If promoting across registries, verify the destination digest and metadata; copying an image must not be assumed to preserve all attestations or signatures. Release tags can be made immutable by registry policy, but clients must still resolve and verify the intended artifact. Keep the index identity and required runnable child manifest identities together. Verify the approved digest independently at the destination, confirm retention and required evidence, and reject a stale or mismatched release even if its tag looks correct.
Common mistake
Rebuilding after approval can change dependencies, base images, metadata or output. A matching commit is not proof of a matching image digest.
Manual practice
Given the ledger, select the only approved production artifact. Describe what additional records you would need to approve B and how you would verify the selected digest.
Worksheet: lab-fixtures/docker-ci-cd/03-immutable-release/scenario.txt.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Promote immutable image releases — Knowledge check
Apply release and CI/CD reasoning to a fictional scenario.
Staging tested A, but latest now points to B. What should the deployment select?
Why retain a source commit alongside the digest?
When copying a release to another registry, what must be verified?