Skip to the workspace
Pebellslearn by building
Introduction  ›  Capstone Project

Docker and the OCI Standards

Docker and OCI 12 minDocker is one set of tools for building and running containers, while the Open Container Initiative defines the shared image, runtime and distribution formats that let many tools work together.

docker / Docker and the OCI Standards

Explore each scene at your own pace.

01 · The rule

The rule

Docker and the OCI Standards

You build the quicknotes image with Docker. Production runs on Kubernetes, which does not use Docker at all, and a colleague prefers a tool called Podman. Will your image work for all of them? It will, and the reason is a set of open standards that sit underneath Docker.

The rule

Docker is one tool; OCI is the shared format every tool agrees on.

Docker is a collection of software for building, sharing and running containers. When you type a command, several pieces cooperate:

  • the docker CLI, which only sends requests;
  • dockerd, the Docker daemon that manages images, containers, networks and volumes;
  • containerd, which supervises the life of each container;
  • runc, a small program that asks the kernel to create the isolated process.

The Open Container Initiative (OCI) is an open project, run under the Linux Foundation since 2015, where companies agreed on common specifications. Three matter to you:

  • the image specification: how an image's layers and settings are packaged;
  • the runtime specification: how a runtime turns an unpacked image into a running container (runc is its reference implementation);
  • the distribution specification: how registries store and serve images over HTTP.

Because the quicknotes image follows the image spec, any OCI-compliant tool can run it:

docker build -t quicknotes:1.0 .
podman run -d -p 8080:5000 quicknotes:1.0

The second line assumes the image has reached Podman's store, for example by pushing it to a registry and pulling it. No conversion step is involved.

Scene 1 of 5
Hover to wake the cannons. Drag to move, or use arrow keys when focused. Press Enter to fire a shot.