advanced30 min studyLesson 33 in Engineering

Container image supply

Follow image bytes from build to admission using content identity, provenance, signature policy, and a realistic trust model.

On this page

What you’ll understand

  • Distinguish a movable image tag from a content digest.
  • Explain what signature and provenance checks establish and what they leave unproved.
  • Calculate transfer cost when immutable layers are shared.

A release-latest tag cannot explain which bytes ran yesterday. Image supply must connect source revision, build environment, artifact, and authorized production identity. Immutability solves the question of which bytes were selected, while verification policy solves a different question: whose assertion about those bytes should this environment accept?

Name bytes independently of convenient labels

OCI descriptors identify referenced content using a media type, size, and digest. The digest provides a content identity that can be checked against retrieved bytes. A registry tag is a convenient name whose target may change; recording a digest makes a deployment's selection explicit. For a multi-platform artifact, also record the image index and selected platform manifest so an incident investigation can identify what actually ran on a particular architecture.

Build once, verify the resulting identity, and promote that identity across environments. Rebuilding from the same source revision may still produce different bytes because dependencies, timestamps, or toolchains changed. This does not make reproducibility impossible; it means the build inputs need their own identities and controls. Keep a release record connecting source, builder, dependency evidence, image digest, and deployment. A successful smoke test on one digest is not evidence about a later tag target.

d=H(B),acceptBytes⁡(B,d)=[H(B)=d]d=H(B),\qquad \operatorname{acceptBytes}(B,d)=[H(B)=d]
B is the artifact byte sequence and H is the declared collision-resistant digest algorithm. Matching a trusted expected digest verifies content identity; it does not prove benign behavior or identify an authorized builder.↔ Scroll wide equations horizontally.

Verify an authorized assertion, not merely a signature

Signature verification must connect the artifact to an expected signer or workload identity and the appropriate trust root. With identity-based signing, an arbitrary valid certificate is insufficient: constrain the identity and issuer that your release policy recognizes. A signature can establish that an accepted identity signed an artifact assertion. It cannot establish that the application has no vulnerabilities, that its source was reviewed, or that the signer's environment was uncompromised.

Provenance adds evidence about how an artifact was produced, while a software bill of materials records a particular inventory. Their value depends on the producer, completeness, and validation policy. Write admission rules as specific questions: was the artifact built by the protected release workflow, from an approved source, with acceptable evidence? Give emergency exceptions a narrow scope and expiry. Test both a rejected artifact and an accepted one, because a policy that only runs in audit mode may create reassuring logs without enforcing the release boundary.

Preserve availability without weakening identity

A registry outage can block replacement even when existing replicas continue running. Model cold starts, regional caches, and rollback artifacts as part of deployment availability. An immutable local cache reduces repeated transfer, but eviction or a new node can expose the dependency again. Retain the previous approved digest and its evidence for the operational rollback horizon, then test recovery on an empty machine instead of only on warm developer hosts.

Use a small transfer model to distinguish artifact size from fleet-wide downloads. Shared immutable layers can be reused on a node when the runtime's content store retains them. This is a capacity opportunity, not a guaranteed cache hit. A platform should measure actual cold-pull duration, registry errors, and disk pressure. Deleting old layers without knowing which rollback depends on them trades a visible storage saving for an unmeasured recovery risk.

Tcold≈Smissingb+Tverify+TunpackT_{\mathrm{cold}}\approx\frac{S_{\mathrm{missing}}}{b}+T_{\mathrm{verify}}+T_{\mathrm{unpack}}
S is missing compressed bytes and b is effective bytes per second. This deliberately simple serial estimate excludes concurrent downloads, latency per object, contention, and image-start execution time.↔ Scroll wide equations horizontally.

Budget a cold rollout

An image contains a 600 MB common layer and a 120 MB application layer. A node has the common layer cached. Effective registry throughput is 40 MB/s; verification and unpacking take 2 and 4 seconds respectively. Compare this node with a cold node, using decimal MB and the serial estimate.

  1. The warm node is missing only 120 MB, so transfer takes 120 / 40 = 3 seconds. Adding 2 + 4 seconds gives a nine-second estimate.

  2. The cold node is missing 600 + 120 = 720 MB. Its transfer takes 720 / 40 = 18 seconds, making the estimated total 24 seconds.

  3. The cache saves 600 MB and fifteen seconds under these assumptions. Across ten genuinely cold nodes, total transfer is 7,200 MB, so a shared registry bottleneck could invalidate the per-node throughput assumption.

  4. Record the approved digest and verification result on both paths. Cache presence should change the amount downloaded, not the identity required by admission policy.

The result

Warm-cache startup is substantially cheaper in this scenario; production planning still needs the cold path and aggregate registry limit.

Explore the model

Interactive lab

Interactive lab · reliability

Count registry replicas without inventing trust

The lab counts n replicas, k unavailable replicas, and a simple majority. Use it to discuss how many registry endpoints remain. It does not model registry replication semantics, signature verification, content integrity, or correlated regional outages; majority presence alone proves none of those properties.

Count registry replicas without inventing trustA replica count and a majority threshold, without a consensus protocol. Playback highlights fixed replica states. Having a majority alone does not establish linearizability, durability or failure independence. Current readings: Available replicas: 4 of 5; Majority needed: 3; Majority available?: Yes. All parameters are adjustable with the labeled controls below.Majority available · need 3 of 5Playback highlights fixed statesR1 · upR2 · upR3 · upR4 · upR5 · downCyan mark: majority threshold
AvailableUnavailableMajority threshold
Available replicas
4 of 5
Majority needed
3
Majority available?
Yes
t = 0 s

A replica count and a majority threshold, without a consensus protocol. Playback highlights fixed replica states. Having a majority alone does not establish linearizability, durability or failure independence. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.

Look forArtifact identity, trust policy, and distribution availability need separate checks.

Check your understanding

An image has a valid signature from an unfamiliar identity. What should a release policy conclude?

Try it yourself

A rollout's missing layers total 900 MB, effective bandwidth is 30 MB/s, and verification plus unpacking takes eight seconds. Calculate the estimate. Then explain why keeping only a release tag is inadequate for a reproducible rollback.

Take a moment to make a prediction or work it out on paper. Open a hint when you need one.

Give me a hint

Use bytes divided by bandwidth, then include the fixed work. A tag can select different content later.

Compare with the solution

Transfer takes 900 / 30 = thirty seconds; the serial estimate is thirty-eight seconds. A rollback record needs the approved immutable digest and its verification evidence because the same release tag may later refer to another image. The platform should retain the artifact for the rollback horizon and test whether an empty node can retrieve it under outage conditions.

Take it with you

  • Use a digest to record the exact artifact selected for release.
  • Verify an authorized identity and explicit evidence requirements.
  • Cold distribution and retained rollback artifacts are part of operational readiness.

Read further

Original sources and deeper explanations to follow at your own pace.

Optional progress, saved in this browser when available. Revisit any lesson at any time.

Lesson not marked complete.