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.
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.
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.
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.
- Publish: produce one multi-platform index and record its digest as the release identity.
- Review: inspect the index and verify both required child manifests exist.
- Promote: move environment metadata or deployment configuration to the approved index digest; do not rebuild the release.
- Run: each host/runtime selects its compatible platform manifest.
- Observe: retain index digest, selected platform, child manifest/config/local image identity, container ID, and deployment timestamp.
- 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.
Knowledge check
Does digest pinning mean an application should never receive base-image updates?
No. Pinning makes updates explicit and reviewable. A controlled process resolves, tests, and commits a new digest.
Why record both an index digest and the selected platform during an incident?
The index identifies the multi-platform release; the platform tells you which child manifest/config/layers the runtime actually selected.
Is the smallest image automatically the most secure production base?
No. Size can reduce unnecessary components, but security also depends on provenance, patching, configuration, runtime privileges, and vulnerability exposure.
What should happen before broad image cleanup during disk pressure?
Inspect disk usage, references, containers, builders, rollback needs, and ownership. Remove only a proven scope whose dependencies and recovery path are understood.
Official references and version notes
- Docker: What is an image? — image/layer fundamentals and local image inspection.
- docker image pull — content-addressable image storage, shared layers, pull digests, and pulling by digest.
- docker image inspect — local image metadata, IDs, RepoDigests, rootfs data, and platform-aware inspection.
- docker image ls — repository/tag presentation, image IDs, and digest display.
- docker image history — build-history presentation and platform selection.
- docker buildx imagetools inspect — registry-side image index/manifest inspection without assuming the local store contains every platform.
- containerd image store with Docker Engine — Engine 29 fresh-install default, snapshotters, multi-platform local storage, and upgrade/userns-remap caveats.
- Docker storage drivers — layer sharing, copy-on-write context, history examples, and classic storage-driver behavior.
- OCI Image Specification v1.1.1 — current stable OCI image-format release used as the chapter's standards baseline.
- OCI image manifest — config descriptor, ordered layer descriptors, media types, and single-image/platform semantics.
- OCI image index — higher-level descriptor set used for multi-platform publication.
- OCI image configuration — runtime configuration, rootfs DiffIDs, history, and ImageID-related content.
- OCI content descriptors — media type, digest, size, platform, and content-verification semantics.
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.
0x716c4Ab160C4B66F31a28AE2448BfF68fc3a2ef0
Send only Ethereum/ERC-20 compatible assets to this
address.