Skip to content

OCI

The OCI is the Open Container Initiative, the standards body defining image, runtime, and distribution specifications for every modern container tool.

Definition

What it is

The Open Container Initiative (OCI) is a governance project under the Linux Foundation that writes and maintains the container ecosystem's foundational standards. It publishes three specifications. The image specification defines how a container image is structured on disk: layers, manifests, configuration, and how they compose into a portable artifact. The runtime specification defines how a container is executed: the lifecycle, the execution environment, the isolation contract between the runtime and the operating system. The distribution specification defines how images are pushed and pulled over HTTP from a registry. Together, these three specifications turn containerization from a vendor-specific implementation (Docker, originally) into a portable protocol any compliant tool can read or write.

The OCI is not a product, a tool, or a company. It is a set of documents with reference implementations, plus a certification program that lets a tool claim "OCI-compliant". Tools and platforms across the ecosystem build on these specifications: Docker, containerd, Podman, Kubernetes, BuildKit, Helm, Harbor, and every major cloud container registry.

Why it matters

Before the OCI, container formats were vendor-specific. Docker had its own image format and runtime. CoreOS had rkt. Other platforms had their own. A container built with one tool was not guaranteed to run with another, and a registry built by one vendor was not guaranteed to serve another vendor's client. The ecosystem was fragmented, and portability was an accident of marketing arrangements rather than a property of the technology.

The OCI changed this by writing down the specifications and certifying implementations against them. The result is that an image built with BuildKit on a Mac can be pulled by containerd on a Linux server, stored in Harbor, scanned by Trivy, mirrored to ECR, and run by Podman. Each of those steps is OCI-compliant, so none of them has to care which tool built the image, as long as the image conforms. That property — interoperation without coordination — is what makes the container ecosystem composable.

How it works

The image specification describes a layered structure. Each image has a config (JSON: environment, entrypoint, working directory, labels) and one or more layers (tarballs of filesystem changes). A manifest ties them together: it lists the config and the layers, each referenced by a content-addressable digest. A manifest index (or "manifest list") allows multiple platform-specific manifests (linux/amd64, linux/arm64) to live under one tag, so a client can pull the right one for its architecture. Every artifact is content-addressed: the digest of a layer is the SHA-256 of the tar, and changing a single byte changes the digest and therefore the whole image identity.

graph TD
  T[Tag: nginx:latest] --> I[Manifest index]
  I --> M1[Manifest linux/amd64]
  I --> M2[Manifest linux/arm64]
  M1 --> C[Config JSON]
  M1 --> L1[Layer 1 tar]
  M1 --> L2[Layer 2 tar]
  M1 --> L3[Layer 3 tar]

The runtime specification defines what happens next. A compliant runtime receives an OCI runtime bundle — a directory with the unpacked filesystem, the config JSON, and optionally other files — and executes the process described in the config inside an isolated namespace. The runtime is responsible for creating the namespaces, setting up cgroups and seccomp filters, executing the entrypoint, and reporting the exit code. runc is the reference implementation; crun is a faster alternative; gVisor and Kata Containers are OCI runtimes with stronger isolation models.

Working with OCI artifacts in practice

  1. Pull by digest, not by tag

    Tags are mutable; digests are not. A deploy that references nginx@sha256:... is pinned. A deploy that references nginx:latest is a moving target.

  2. Keep images small and layered

    Each layer is downloaded and cached independently. Reorder Dockerfile instructions so that rarely changing layers come first, and combine RUN commands to reduce layer count.

  3. Sign and verify images

    Cosign, Notation, and Sigstore add OCI artifacts that sign manifests. A policy engine (Kyverno, OPA) can reject unsigned images at admission time. Signing and verification are OCI extensions, not bolt-ons.

  4. Mirror to a local registry for reproducibility

    Registries are mutable infrastructure. Mirror images to a registry you control, pinned by digest, for any environment that needs to be reproducible across time.

The distribution specification defines the HTTP API that registries expose. It covers manifest push and pull, layer upload and download, tag listing, and now referrers API for querying artifacts that reference another artifact (signatures, SBOMs, attestations). This is why a single image can be pulled by Docker CLI, containerd's ctr, Podman, CRI-O, and any other client that implements the spec, from any registry that implements the spec — without per-tool coordination.

Common failures

A second failure is assuming "OCI-compliant" means "fully compatible". Compliance is a claim about a set of conformance tests, not about behavior in every edge case. Some registries support manifest lists, others do not; some runtimes support seccomp profiles out of the box, others require configuration. Cross-tool interoperability is real, but it has edge cases, and teams that assume universal compatibility without testing get surprised at the boundary.

A third failure is ignoring the referrers API and building signature or SBOM workflows on top of the tag namespace. Signatures and SBOMs are OCI artifacts, not tags. Attaching them as referrers is what makes them portable across registries that support the spec; encoding them as tags (e.g. nginx:latest.sig) does not scale and breaks the content-addressing model.

Origin

In 2013, Docker's image format was the de facto standard for containers, but it was a single-vendor standard with no published specification. In 2014, CoreOS published App Container (appc) as a rival specification. In June 2015, Docker, CoreOS, and a group of vendors founded the Open Container Initiative under the Linux Foundation to prevent format fragmentation. The OCI published the image specification in 2017 (v1.0), the runtime specification in 2017 (v1.0), and the distribution specification in 2020 (v1.0). Since then, the OCI has become the reference for all subsequent container work: artifacts, signatures, attestations, and referrers are all designed as extensions of the same model.

The Open Container Initiative exists to create open industry standards around container formats and runtime. Its goal is to ensure that the container ecosystem remains interoperable as it evolves.

— Open Container Initiative, *OCI Charter*, 2015

Evidence

FAQ

Is Docker an OCI-compliant runtime?

Docker is a platform that includes an OCI-compliant image format and uses an OCI-compliant runtime (containerd, which in turn uses runc). Docker itself is not a runtime; it is a build system, image format, and client that sits on top of OCI components. When people say "Docker is OCI-compliant", they mean the Docker ecosystem implements the specifications, not that Docker itself is the runtime.

What is the difference between an OCI image and a Docker image?

An OCI image is a specification-defined artifact with a config, layers, and a manifest. A Docker image, in its modern form, is an OCI image produced by Docker's tooling. The formats converged in 2017 when Docker donated its image format to the OCI. Older Docker images (pre-v2 schema) had a slightly different structure, but current Docker images are OCI-compliant.

What is the runtime specification for?

The runtime specification defines the contract between a container runtime and the operating system: how the runtime creates namespaces, sets up cgroups, applies seccomp, executes the process, and reports exit codes. It is the interface that allows Kubernetes to use runc, crun, gVisor, or Kata Containers interchangeably: each one implements the OCI runtime contract, so kubelet does not need to know which one is in use.

Do I need to know the OCI specification to use containers?

No. The specifications are for tool builders and platform engineers. Application developers use Docker, Podman, or a Kubernetes workflow, and the specifications recede into the background. But understanding the OCI is what explains why images are portable, why digests matter, and why signing and SBOMs work the way they do.

What is the referrers API?

The referrers API, added to the distribution specification in v1.1 (2023), lets a registry answer "what other artifacts refer to this manifest?". Signatures, SBOMs, and attestations are stored as OCI artifacts that refer to the image manifest, and clients can query them without knowing their tags in advance. This is what makes artifact attachment portable: any compliant registry can store them, any compliant client can retrieve them.

Connections

OCIContainerContainer Container Container DockerDockerfileKubernetesArtifactDigest

● broader ● narrower ● related

Used in the garden

No mentions yet.

Sources

Etymology

Origin: acronym

  • Open (adjective): public, open standards process
  • Container (noun): from Latin continere, to hold together
  • Initiative (noun): from Latin initiare, to begin

Semantic network

OCIContainerContainer Container Container DockerDockerfileKubernetesArtifactDigest

● broader ● narrower ● related

Sources