Image Manifest and Digest
What you'll learn: How manifests and digests guarantee that the container image you run is exactly the one you expect—byte-for-byte.
What Is an Image Manifest?
An image manifest is a JSON document stored in a container registry that describes everything about an image: its layers, their order, the platform it runs on (OS/architecture), and configuration details. Think of it as the "recipe card" for your container image—it lists all the ingredients (layers) and how to assemble them.
When you pull an image, the registry first sends the manifest. Your container runtime reads it to know which layers to fetch and in what order to stack them.
What Is a Digest?
A digest is a cryptographic hash (typically SHA-256) of the manifest itself. It looks like this:
sha256:a1b2c3d4e5f6...
Because it's a hash of the manifest's content, even the tiniest change—a single byte difference in any layer—produces a completely different digest. This makes digests content-addressable identifiers: the digest is the content's fingerprint.
Why This Matters
Tags like nginx:latest are mutable—they can point to different images over time. Digests are immutable—they always reference the exact same image content. When you pull by digest:
docker pull nginx@sha256:a1b2c3d4e5f6...
You're guaranteed to get that precise image, every time, on any machine. This ensures:
- Integrity: No tampering or corruption
- Reproducibility: Deployments are identical across environments
- Auditing: You know exactly what ran in production
Analogy
A manifest is like a parts list for IKEA furniture. The digest is a tamper-proof seal on that list—if anyone changes even one screw, the seal breaks.
Key Takeaway: The image manifest lists an image's layers and metadata, while the digest is its immutable cryptographic fingerprint, ensuring you always deploy exactly what you tested.