Pebellslearn by building
0%
RoadmapsMatrixCoursesSandboxSign in
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 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.

The shortcut

Picture the chain of hand-offs: CLI → dockerd → containerd → runc → your process. Each link does one job, and the formats passed between them are standards, so links can be swapped.

docker run quicknotes:1.0, link by linkStep 1 of 4
  1. CLI

    The docker command turns your words into an API request and sends it to the daemon. It does no container work itself.

The trap is treating "Docker" and "containers" as the same word. Docker is a popular toolset; containers are a Linux feature; OCI is the agreement that makes images portable between toolsets.

Drills

Answer fast — trust the rule.

quick drill

What is the OCI?

quick drill

Which component actually asks the kernel to create the container process?

quick drill

Can Podman run an image that was built with docker build?

quick drill

Which OCI specification describes how registries store and serve images?

Remember

  • Docker is one toolset; OCI defines the shared image, runtime and distribution formats.
  • Shortcut: CLI → dockerd → containerd → runc → process.
  • Trap: "Docker" is not a synonym for "containers"; other OCI tools run the same images.

Practice — level up

0/1 solved

Write your answer, then compare it with a rubric and a model answer.

ExplainWhy an image is portable

Your team builds quicknotes with Docker, but production runs Kubernetes with containerd and a colleague uses Podman. Explain why the same image works everywhere, and trace what happens between typing docker run and the process starting.