Chapter 04Lesson 03~95 minutes

Images, Layers, Content-Addressable Storage, Manifests, Config Objects, and Image Identity: Configuration, Design Choices, and Tradeoffs

Image design is a set of trade-offs rather than a single best command. This lesson compares tag convenience with digest pinning, single-platform manifests with multi-platform indexes, minimal bases with compatibility-rich bases, and cache retention with deliberate cleanup using reproducibility and operability as the decision criteria.

Trade-offsDigest pinningMulti-platformBase imagesRetention

Learning objectives

  • Choose between tag-only, tag-plus-digest, and digest-only references according to update, rollback, and audit requirements.
  • Decide when a single-platform manifest is sufficient and when a multi-platform image index is required.
  • Compare minimal and compatibility-rich base images using attack surface, debugging, package availability, size, and operational support.
  • Balance local content/cache retention against disk pressure without broad or dependency-blind cleanup.
  • Justify image choices with observable identities, platform support, and rollback evidence instead of preference alone.
Chapter 04 evidence baseline — verified 2026-09-21. This chapter uses a free/local/disposable Docker path. Version-sensitive image behavior is inspected from the active daemon and registry rather than assumed. The standards baseline is OCI Image Specification v1.1.1; current Docker Engine 29 fresh installs default to the containerd image store, while upgraded hosts can differ. The lab image is a small Docker Official Image, and all immutable references are captured at run time rather than copied from prose.

1. Start with the decision, not the command

Image design choices change who can reproduce a deployment, how fast security updates arrive, which platforms are supported, how much local content is retained, and how easy an incident is to explain. The right choice depends on whether you are optimizing a developer loop, a release artifact, a fleet promotion, a debugging environment, or a constrained edge target.

For every choice in this lesson, keep four pieces of evidence together: human reference, immutable digest, platform, and the policy/operational reason for the choice.

2. Tag convenience versus digest pinning

Reference style Strength Risk Good fit
repo:tag Readable; tracks publisher updates automatically. Same text can resolve to different bytes later. Exploration, consciously rolling channels.
repo:tag@sha256:… Readable context plus immutable content identity. Requires an explicit update process when content changes. Reviewed Dockerfiles, release manifests, auditable automation.
repo@sha256:… Shortest immutable registry identity. Less human-readable without adjacent metadata. Promotion records, rollback targets, machine evidence.

Pinning is not the same as never updating. A mature process makes updates explicit: resolve a new upstream release, review/test it, capture the new digest, and change the pinned reference in version control. That gives both freshness and auditability.

3. Single-platform manifest versus multi-platform index

A single-platform image can be simpler and completely adequate when the execution fleet is intentionally homogeneous. A multi-platform index is valuable when one release name must serve multiple OS/architecture combinations. The cost is more evidence: every supported platform has its own manifest and potentially different config/layer digests.

One release name, multiple platform manifests
flowchart TD
  A[acme/app:2.4 tag] --> B[index digest]
  B -- linux/amd64 --> C[manifest A digest]
  B -- linux/arm64 --> D[manifest B digest]
  C --> E[amd64 config + layers]
  D --> F[arm64 config + layers]
            

Promotion policy should say whether approval binds to the index as a whole or to a specific child manifest. For a heterogeneous fleet, the index digest is a useful release subject; incident evidence should still record which platform child actually ran.

4. Minimal base versus compatibility-rich base

Dimension Minimal base Compatibility-rich base
Transfer/storage Usually smaller. Usually larger.
Package/tool availability Deliberately limited. Broader runtime/debug tooling.
Attack surface Can reduce unnecessary packages, but “small” does not automatically mean secure. More components to patch and inventory.
Debugging May require an external/debug image or ephemeral tooling. Interactive diagnosis can be easier.
Compatibility May expose libc/CA/timezone/native-library assumptions. Can match conventional distro expectations better.

Do not compare bases only by compressed size. Record architecture support, libc/runtime compatibility, update cadence, provenance/source policy, CVE maintenance, non-root support, and operational debug plan.

5. Retain useful content or clean it?

Local image content accelerates rebuilds, pulls, and rollback, but consumes disk. Cleanup is therefore an ownership problem before it is a disk-space command. Ask which references, stopped containers, builders, and snapshots depend on the content and whether rollback requires it.

Avoid “free space now” habits such as broad docker system prune -a --volumes. Prefer read-only accounting first (docker system df, image lists, builder disk usage), then remove an exact lab-owned reference or builder/cache scope whose consequences are understood.

6. Local store architecture affects capability, not release identity

Fresh Engine 29 installs default to the containerd image store and can retain multi-platform images locally. Upgraded daemons may still use the classic store. That changes local capability and disk layout, but your release process should still anchor on OCI identities from the registry and observed local identity. Do not make “which directory contains the layers” part of application release logic.

7. Worked scenario: one release for amd64 and arm64

Suppose a team publishes registry.example.test/payments:2.4 for Linux/amd64 and Linux/arm64. Developers want a readable tag; production needs immutable rollback; security wants scan/attestation subjects; operations wants to know which child ran during an incident.

  1. Publish: produce one multi-platform index and record its digest as the release identity.
  2. Review: inspect the index and verify both required child manifests exist.
  3. Promote: move environment metadata or deployment configuration to the approved index digest; do not rebuild the release.
  4. Run: each host/runtime selects its compatible platform manifest.
  5. Observe: retain index digest, selected platform, child manifest/config/local image identity, container ID, and deployment timestamp.
  6. Rollback: select the prior approved index digest instead of guessing which tag used to point there.

The same design can keep :2.4 for humans while treating the digest as the release's immutable key.

8. Decision table

Situation Recommended identity/design Evidence to retain
Local tutorial exploration Versioned tag, then capture digest after pull. Tag, RepoDigest, platform.
Production deployment Digest-pinned reference; readable tag recorded alongside. Release/index digest, selected platform manifest, runtime identity.
Mixed amd64/arm64 fleet Multi-platform index. Index plus child manifests for supported platforms.
Strict minimal runtime Minimal/distroless-style base only if app/debug requirements are met. Base digest, package/SBOM evidence, debug strategy.
Developer diagnostic image Compatibility-rich tooling can be acceptable in a non-production stage. Separate image/digest and clear scope.
Disk pressure Targeted cleanup after dependency/accounting inspection. Before/after disk evidence and exact removed references.

9. Supply-chain and rollback implications

A digest proves content identity, not trustworthiness. It does not tell you who built the image, whether dependencies are vulnerable, whether the source was reviewed, or whether the image is authorized for production. Those are later supply-chain controls. Digest identity is the join key that lets scans, SBOMs, provenance, signatures, approvals, and deployment evidence refer to the same subject.

Likewise, a minimal image can still contain a critical vulnerability, and a signed image can still be operationally broken. Keep identity, security signals, and runtime health separate.

Next lesson

Next: Diagnostics, Failure Modes, Security, and Performance

Apply these distinctions to realistic failures where the wrong digest, wrong platform, mutable tag, history assumption, or cleanup action produces misleading evidence.

Knowledge check

Does digest pinning mean an application should never receive base-image updates?

Why record both an index digest and the selected platform during an incident?

Is the smallest image automatically the most secure production base?

What should happen before broad image cleanup during disk pressure?

Official references and version notes

Current baseline, not a frozen requirement

Verified 2026-09-21: Docker Engine 29.8.1 remains the current Engine 29 patch line used by this course baseline. Fresh Docker Engine 29 installations use the containerd image store by default, while upgraded older daemons can retain the classic storage-driver store; userns-remap is a documented exception. OCI Image Specification v1.1.1 is the current stable release. The mandatory lab uses the Docker Official Image busybox:1.37.0 only as a small human-readable starting reference, then captures and uses the registry-provided digest at run time. Always record the actual daemon, storage backend, platform, Buildx version, media types, and resolved digests observed on the learner's system.

Keep the academy open

Support free, practical DevOps education.

Every lesson is designed to remain readable in a browser, downloadable from GitHub, and usable without a paid learning platform. Contributions help expand and maintain the curriculum.

Ethereum / ERC-20
0x716c4Ab160C4B66F31a28AE2448BfF68fc3a2ef0 Send only Ethereum/ERC-20 compatible assets to this address.