The issue opens pre-filled with this page title and URL.
A tag such as alpine:3.24.2 does not necessarily designate the same image from one day to the next, whereas a digest always designates the same content. This difference comes from the OCI format (Open Container Initiative), the standard that describes what an image is. It also sets how a registry (the server that stores images) distributes an image, and how a runtime (the program that starts the container) executes it. This page defines its vocabulary: tag, digest, manifest, index, configuration and layers. It needs no tool and can be read without Docker.
What you will learn
Name the three OCI specifications and say what each one defines
Tell a tag, a digest, a manifest, an index, a configuration and a layer apart
Read an OCI manifest
Choose between a tag and a digest to designate an image
Prerequisites
You have read Container images: layers and content: an image is a set of layers and a configuration, and a layer takes the fingerprint of its content as its name.
The Open Container Initiative is the organization that publishes the open standards for containers. Its three specifications cover the whole life of an image, from its description to its execution.
Specification
What it defines
Image
The format of an image: manifest, configuration, layers
Distribution
The HTTP API of a registry: pushing and pulling images
Runtime
How to run a container from a folder and a config.json file; runc is the reference implementation
Swipe to see more
Thanks to this standard, an image built with one tool runs with another (Docker, Podman, containerd, CRI-O), and a registry such as Docker Hub, Harbor, Quay or GHCR speaks the same language to all of them. The lesson Run an OCI bundle with runc and read its config.json puts the Runtime specification into practice; this page covers Image and Distribution.
What documents make up an OCI image?
An OCI image is a manifest that points to a configuration and to layers, each document being named by its digest. The digest is the SHA-256 fingerprint of the content: the content determines the name, never the other way round.
In the diagram, follow the arrows from the tag. It points to the manifest, which in turn references the configuration and each layer by their digest.
The list of the configuration and the layers, with their digests and sizes
sha256:…
Configuration
The metadata of the image: platform, environment variables, command, user, ports
sha256:…
Layer
A tar archive of the files added, modified or deleted
sha256:…
Swipe to see more
The digest of an image is the digest of its manifest (or of its index, see below): if the manifest changes, even by one byte, the digest changes. Since the manifest contains the digests of the configuration and of the layers, knowing the digest of the manifest is enough to verify the whole image.
What does a tag designate, and what does a digest designate?
A tag is a readable name that the publisher can move to other content, whereas a digest designates one precise content forever. The tag is convenient for humans. The digest is the reference that pins the content you get.
The notation for a reference that carries both is name:tag@sha256:…. For example, the following reference designates the alpine 3.24.2 image by the digest of its index, a top-level document described below:
The table gives the reference to use depending on the context.
Context
Reference
Why
Local development
Tag
Readable, convenient
Publishing a version
Versioned tag, digest recorded at publication
The tag is readable, the digest can be found again
Deployment, audit
Digest
Same content every time, exact trace
Swipe to see more
A versioned tag such as 3.24.2 is not immutable for all that: it can be republished, unless the registry forbids it through a policy. In production, designate the image by its digest.
Your turnYou note that production runs alpine:3.24.2. In a month, a colleague has to run exactly the same image again.…
You note that production runs alpine:3.24.2. In a month, a colleague has to run exactly the same image again. What do you hand over, and why is the tag alone not enough?
A hint
Ask yourself what the tag designates today, and what it could designate in a month.
I have tried: show the answer
Hand over the digest, in the form name@sha256:…. The tag is a name that the publisher can republish to point to another manifest: in a month, alpine:3.24.2 may designate a different image. The digest is computed on the content, so it can only designate that content.
What does a manifest contain?
A manifest is a JSON document that points to the configuration and to each layer by their digest, size and type. The form below is simplified, and the digests are shortened.
The mediaType field says which type of document it is: a manifest, a configuration, a tar layer compressed with gzip. Registries serve two manifest formats, Docker's (application/vnd.docker.distribution.manifest.v2+json) and OCI's (application/vnd.oci.image.manifest.v1+json). The common tools read both.
What is an index?
An index is a document that lists several manifests, one per platform. A platform combines an operating system and a processor architecture, such as linux/amd64 or linux/arm64. A tag can therefore designate either a manifest, for an image made for a single platform, or an index, for an image published for several.
In the second case, the client, the tool that downloads the image, picks from the index the manifest that matches its machine, then downloads its layers. The digest of the tag is then the digest of the index, which differs from that of each manifest it lists. The lessons of the Docker training go further on this point: Read an OCI image and its identity reads the index and the manifest that a container used, and Build an image for several architectures publishes an index.
What do the configuration and the layers contain?
The configuration says how to run the image, the layers contain the files. The configuration holds the platform (architecture, os), the config section (environment variables, command and entrypoint, user, working directory, declared ports), the rootfs list of the fingerprints of the uncompressed layers (diff_ids) and the build history.
Each layer is a tar archive, often compressed. Its digest in the manifest covers the stored object, that is the archive as stored (compressed, when it is), whereas its diff_id in the configuration covers the uncompressed archive. The first one is used to verify what the client downloads, the second one identifies the content of the layer whatever its compression. The lesson Read an OCI image and verify its digest recomputes both.
What other objects can a registry store?
An OCI registry does not store only images: it also accepts other artifacts, such as Helm charts (the packages of Kubernetes applications), signatures or software bills of materials (SBOMs), which attach to an image through its digest. This topic belongs to the supply chain: ORAS (in French) is the tool for it, and Check what an image contains, and who signed it shows its use on the Docker side.
Which vocabulary should you remember?
The table lists the terms of the page, from the outermost to the innermost.
Term
Definition
Registry
Server that stores and distributes images according to the Distribution specification
Tag
Readable, movable name that designates a manifest or an index
Digest
SHA-256 fingerprint of a document, which identifies its content
Index
List of manifests, one per platform
Manifest
Document that points to the configuration and the layers of an image
Configuration
Metadata of the image: platform, command, environment, user
Layer
Tar archive of the file differences with the previous layer
Swipe to see more
Key takeaways
OCI publishes three specifications: Image (the format), Distribution (the API of registries) and Runtime (the execution).
An OCI image is a manifest that points to a configuration and to layers, each named by its digest.
The digest is the SHA-256 fingerprint of a document: it changes as soon as one byte changes.
A tag is a movable name, a digest designates fixed content: in production, designate the image by its digest.
An index lists one manifest per platform, and a tag can designate an index rather than a manifest.
The digest of a layer covers the stored archive, its diff_id covers its uncompressed content.
Test your knowledge
This quiz asks seven questions drawn from thirteen. It checks that you can tell a tag from a digest, name the documents of an image and read a manifest.
Knowledge check
Check what you have learned with this interactive quiz
7 questions
7 min
80% to pass
How it works
The timer starts when you click Start
Multiple choice, true/false and short answer questions
You can move between questions
Detailed results are shown at the end
Starts the quiz and the timer
⏱️--:--
0 / 7
Review
(0/0)
--:--
0%
Result saved on this device. It will be sent to your account at the next sync. Sync now
0Correct
0To review
0:00Time
-Level
Score by domain
A domain groups several guides and gets several questions, so its score is more reliable than a per-topic score, which often rests on a single question.
Summary
Strengths
No topic passed at 80% on at least two questions yet.