Skip to Main Content
Talk Beginner MIT License (demo code); CC BY-SA 4.0 (slides, speaker notes, written material) and Apache-2.0 (for others)

One Image, Three Runtimes: What OCI Actually Promises

Proposal status is Review Pending
Session Description

You've run “docker run” a hundred times. But what is a container image, and why does the exact same one run on Docker, on a Kubernetes node, and now inside a tiny VM on a Mac? This talk treats the image as a file you can open, and the runtime as one of several programs that can read that file.

Live on stage, I build one image and run it unchanged on three open-source runtimes:

  1. Docker Engine (Moby, running inside a Lima VM - not Docker Desktop)

  2. containerd via nerdctl, which is what Kubernetes actually runs

  3. apple/container - Apple's Apache-2.0 runtime that gives every container its own lightweight VM

Then I crack the image open. “docker save” gives a tarball; “tar -xf” and “jq” show what's inside: “index.json”, a manifest, a config blob (Dockerfile, frozen: env, entrypoint, `rootfs.diff_ids`) and layer blobs that are plain tarballs of filesystem diffs. “mediaType: application/vnd.oci.image.manifest.v1+json” show the spec.

The image never touches a registry or the network. It moves between runtimes as a tarball by hand, which is itself the point.

Outline (27 min)

  1. 0-2: hook. “docker run”, “kubectl run”, “container run”. Same image, three programs, nobody coordinated. Why does this work?

  2. 2-6: build once. Five-line Alpine Dockerfile that prints “hostname”, “/etc/os-release”, “uname -r”. “docker build”, “docker save”.

  3. 6-13: run thrice. Load the tarball into containerd and apple/container, run all three in a three-pane terminal. Note the kernel and hostname differences, park them.

  4. 13-20: crack it open. “tar”, “tree”, “jq” through index, manifest, config, layers. Optional sha256 check.

  5. 20-25: Why runtimes differ. Three columns: shared host kernel (namespaces + cgroups), one shared Linux VM (Lima / Docker Desktop), one VM per container (apple/container, same idea as Kata on Linux). Shared kernel is fast and dense; VM-per-container is stronger isolation. OCI lets us choose the runtime without touching the image; “RuntimeClass” in Kubernetes.

  6. 25-27: three takeaways and a call to action

Key Takeaways

Three terms which could get confusing:

  • Image is the artifact: JSON manifests, tarball layers, SHA256 digests.

  • Container is a running process (or VM) created from that artifact.

  • Runtime is whichever program reads the artifact and creates the container. There are many; the image doesn't care which.

What "OCI-compatible" actually promises: reads the JSON, unpacks the tarballs, checks the hashes. That is why your image is portable.

A quick check which audience can run: “docker save <image> -o x.tar && tar -xf x.tar && jq . manifest.json”.

References

Session Categories

Tutorial about using a FOSS project
Technology architecture
Talk License: MIT License (demo code); CC BY-SA 4.0 (slides, speaker notes, written material) and Apache-2.0 (for others)