The OCI standards: image, runtime and distribution
Three Open Container Initiative specs define what an image is, how a runtime starts one and how registries serve it, which is why tools interoperate.
The OCI standards: image, runtime and distribution
The player loads from youtube-nocookie.com when you press play. Nothing reaches YouTube before that.
Not started
What you'll learn
- The Open Container Initiative, founded in 2015 under the Linux Foundation, publishes three specs: image, runtime and distribution.
- The image spec defines an image as content-addressed blobs: a manifest, a JSON config and a list of tar layers, each named by the SHA-256 of its bytes.
- A layer has two hashes. The manifest names the compressed blob, and the config's diff_ids name the uncompressed tar.
- The runtime spec defines a bundle, a root filesystem plus config.json, and the create, start, kill and delete operations a runtime such as runc or crun must support.
- The distribution spec is the HTTP API registries speak, built on /v2/<name>/manifests/<reference> and /v2/<name>/blobs/<digest>.
- Image spec 1.1 added artifactType and subject, and distribution spec 1.1 added the referrers API, so registries can store signatures and SBOMs that point at an image.
Why a standard was needed
In 2014 “a container image” meant “whatever Docker produces”, and “a container runtime” meant Docker. CoreOS disagreed, shipped rkt with its own image format, and the industry looked set for a format war: images built for one tool that another couldn’t run. In June 2015 Docker, CoreOS and others formed the Open Container Initiative under the Linux Foundation. Docker donated its runtime code, which became runc, and its image manifest format became the basis of the image spec.
The result is the reason you can build with Docker, push to GitHub’s registry, scan with Trivy and run on a Kubernetes node that has never had Docker installed. Every tool along that chain agrees on three documents. The current versions are image spec 1.1.1, runtime spec 1.3.0 and distribution spec 1.1.1.
Think of the shipping container. ISO 668 fixed its size and corner fittings. Nobody cares who built the crane or the ship, because every crane grips every box. The OCI specs are the corner fittings.
The image spec
An image is a set of blobs, each named by the SHA-256 of its bytes:
- an index (optional) listing one manifest per platform,
- a manifest naming one config and an ordered list of layers,
- a config, JSON with the platform, the default command, environment, user, and
rootfs.diff_ids, - layers, tar archives (usually gzip or zstd compressed) of filesystem changes.
I pulled alpine:latest for linux/amd64 from Docker Hub’s registry API and laid the blobs out as an OCI image layout, the on-disk form the spec defines, which tools like skopeo and docker buildx --output type=oci produce:
$ find oci-alpine -type f | sort
oci-alpine/blobs/sha256/0f49f331d9212aff... 1022 bytes manifest
oci-alpine/blobs/sha256/3ea06e4cb95e726e... 611 bytes config
oci-alpine/blobs/sha256/881fc932939efef0... 3853673 bytes layer (tar+gzip)
oci-alpine/index.json
oci-alpine/oci-layout {"imageLayoutVersion":"1.0.0"}
Every filename is the hash of the file, which I checked with shasum -a 256. That’s content addressing: the name proves the content. One subtlety is worth seeing. The manifest names the layer as sha256:881fc932…, the hash of the gzip bytes. The config names it in diff_ids as sha256:75f1d965…. When I ran gunzip and hashed the 8,713,728-byte tar, I got 75f1d965…. The digest identifies the transfer, the diff_id identifies the filesystem change. Recompress a layer and the first changes while the second doesn’t.
How layers stack into one filesystem is the layers lesson. Indexes get their own lesson.
The runtime spec
The runtime spec never mentions images. Its input is a bundle: a directory with a root filesystem and a config.json. containerd’s job is to turn an image into a bundle. The runtime’s job is to turn the bundle into a running container. A trimmed config.json, written from the spec’s config.md and not generated here:
{
"ociVersion": "1.3.0",
"root": { "path": "rootfs", "readonly": false },
"process": {
"args": ["/bin/sh"], "cwd": "/", "user": { "uid": 0, "gid": 0 },
"env": ["PATH=/usr/sbin:/usr/bin:/sbin:/bin"]
},
"hostname": "demo",
"linux": {
"namespaces": [{"type": "pid"}, {"type": "mount"}, {"type": "network"},
{"type": "uts"}, {"type": "ipc"}],
"resources": { "memory": { "limit": 268435456 } }
}
}
The spec also defines the lifecycle: create sets everything up, start runs the user process, kill signals it, delete cleans up, and state reports one of creating, created, running or stopped. runc implements it. So do crun (in C, used by Podman), gVisor’s runsc, and Kata, whose spec section config-vm describes VM-based runtimes. Version 1.3.0 added a FreeBSD section.
The distribution spec
The distribution spec is the registry HTTP API. Pulling is two kinds of GET:
GET /v2/library/alpine/manifests/latest → the index (by tag)
GET /v2/library/alpine/manifests/sha256:0f49f331… → the amd64 manifest (by digest)
GET /v2/library/alpine/blobs/sha256:881fc932… → a layer
Pushing is the reverse: upload blobs with POST and PUT to /blobs/uploads/, then PUT the manifest under a tag. The spec’s 1.1 release, paired with image spec 1.1, added a way to attach things to an image. A manifest can name a subject (the image it’s about) and an artifactType, and GET /v2/<name>/referrers/<digest> lists everything that refers to an image. That’s how signatures and SBOMs can live next to an image without changing its digest. Docker Hub answers the referrers endpoint. For alpine’s amd64 image it returned an empty index, because Docker’s official images keep their attestations as extra entries in the image index instead.
About the video
The embed is all of Canonical’s “What is the Open Container Initiative?”, February 2026, 11 minutes. Its chapters cover an introduction to the OCI, its three pillars, an image-spec deep dive, interoperability in practice and inspecting image layers. The description says it covers what OCI compliance means and how the standards make images portable. It comes from Ubuntu’s publisher, so the examples may use Canonical’s own tools. It doesn’t show a runtime bundle or the referrers API, which this lesson adds. English was judged from the title, description and its English caption track. The Cef Experience chapters in deeper run a container straight from an OCI bundle with runc.
What was run: Alpine’s index, amd64 manifest, config and layer were fetched from Docker Hub’s registry API with a short Python client and an anonymous token, hashed, decompressed and hashed again, and written into an OCI image layout by a short Python script; the referrers request was made the same way. The config.json above was written from runtime spec 1.3.0 and not run, because there is no Linux or runc here. Spec versions come from the OCI GitHub releases, checked 2026-11-28.
Where this fits
The specs say what Docker must produce. Next, getting Docker itself onto a machine: installing Docker Engine and Docker Desktop.
Check yourself
You build an image with Podman and run it with Docker on another machine. What makes that work?
Both tools read and write the OCI image format and both registries speak the OCI distribution API, so the manifest, config and layers mean the same thing to each.
Why does an image config list diff_ids that don't match the layer digests in the manifest?
The manifest digests are hashes of the compressed blobs as stored and transferred. The diff_ids are hashes of the uncompressed tar, which identify the filesystem change regardless of compression.
What does a runtime need to start a container according to the runtime spec?
A bundle: a directory holding the root filesystem and a config.json that describes the process, mounts, namespaces, cgroup limits and other settings. It never sees the image or a registry.
A registry stores a signature that refers to an image. How does a client find it?
With an OCI 1.1 registry, the signature's manifest sets subject to the image's digest, and GET /v2/<name>/referrers/<digest> lists everything that points at that image.
Go deeper
Notes
Notes are saved to your account.
Everything else on this page works without one — progress and bookmarks keep themselves in this browser and come with you when you sign in. Notes are the one thing worth not trusting to a browser you might clear.
Your notes could not be loaded.