Image Manifest and Layers
What you'll learn: How container registries organize and reference image components using manifests and layer storage.
When you push a container image to a registry, it doesn't store a single monolithic file. Instead, the registry separates the manifest (the "instruction sheet") from the actual filesystem layers (the "building blocks").
How Registries Store Images
The image manifest is a JSON document that acts like a recipe card. It contains:
- Configuration details (environment variables, entrypoint, etc.)
- An ordered list of layer digests
- Metadata about the image
The layers themselves are stored separately as compressed tar archives, each identified by its unique content digest (SHA256 hash). When you push an image, the registry checks which layers already exist—if a layer with that exact digest is present, it skips uploading it entirely.
The Registry Dance
Think of a registry like a well-organized warehouse:
- Manifests are catalog cards that tell you which boxes (layers) you need and in what order
- Layers are the actual boxes on shelves, shared across many different "products" (images)
When you pull an image, the registry first sends the manifest. Your container runtime reads this manifest to discover which layers it needs, then fetches only the missing ones. Layers you already have from other images are reused immediately.
This separation enables powerful features:
- Deduplication: Multiple images sharing base layers don't waste storage
- Efficient pulls: You only download new layers
- Immutability: Layer digests ensure content hasn't changed
Key Takeaway: Container registries store images as manifests (metadata pointers) that reference independently-stored, content-addressed filesystem layers, enabling efficient storage, transfer, and layer reuse across images.