Pcornel
Browse topics
Options
Recent
Favorites
Containers · Technical reference

runc and OCI Runtime Spec

Direct answer

runc is the reference OCI runtime that creates a container from an OCI bundle (config.json + rootfs) by setting up namespaces, cgroups, capabilities and seccomp, then executing the process.

When to use this

Use it to understand low-level container start failures.

First 30 seconds

1. Read the OCI error in pod events or docker run output.

2. Entrypoint exists in the image and is executable?

3. Mount sources exist?

4. runc --version — patched?

5. cgroup driver consistent.

Operational verification

OCI bundle → runc create/start → container process

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
Docker / containerd / Podman / Kubernetes / OCI-compatible platforms
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformDocker / containerd / Podman / Kubernetes / OCI-compatible platforms
Scope / prerequisiteUse it to understand low-level container start failures.
What next?2 suggested next steps
Evidence0
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

2 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 How to verify Verify boundary

When a container fails to start, read the runc error text: missing executable, wrong architecture, mount source missing or permission denied. Confirm the entrypoint path exists in the image and is executable.

Step 2 Common failures Narrow the fault

An entrypoint script with Windows line endings fails with no such file or directory. A bind mount to a missing host path fails at create. A binary built for another architecture fails with exec format error.

Key points

Errors like "OCI runtime create failed" come from runc: invalid mounts, missing binaries in the image, permission or cgroup problems. Keep runc patched (container escape CVEs).

Key checks
  • runc --version — runtime version
  • docker ps -a — containers and exit codes
  • docker logs <c> — container output
  • docker inspect <c> — config, mounts, network, state
ReferenceWhat it is1 section · depth on demand

How it works

Higher-level runtimes (containerd, CRI-O, Docker) convert image configuration into an OCI bundle. runc reads it, sets up namespaces, cgroups, mounts, capabilities and seccomp, then execs the entrypoint. Alternative OCI runtimes such as crun or gVisor (runsc) implement the same interface.

ReferenceImportant terms & boundaries3 sections · depth on demand

Runtime stack

docker / nerdctl / kubelet
        ↓ (API / CRI)
containerd  (images, snapshots, lifecycle)
        ↓
containerd-shim
        ↓
runc / crun / gVisor (runsc) / Kata  (OCI runtime: namespaces, cgroups, exec)

The OCI bundle is a root filesystem plus config.json. Alternative runtimes add stronger isolation (gVisor user-space kernel, Kata VMs) at some performance cost; select them in Kubernetes with RuntimeClass.

In depth

The OCI runtime specification defines a bundle: a directory with a root filesystem and a config.json describing the process, mounts, namespaces, cgroup limits, capabilities and seccomp profile. A low-level runtime such as runc or crun turns that bundle into a running process.

Lifecycle defined by the spec

create (namespaces, mounts and cgroups set up; process not yet started) → start (user process executes) → kill → delete. Hooks such as createRuntime and poststart let tools add networking or device setup between steps.

Low-level runtimes compared

RuntimeIsolationTypical use
runcNamespaces + cgroups (shared kernel)Default almost everywhere
crunSame as runc, written in CFaster start, lower memory; default in some Podman setups
gVisor (runsc)User-space kernel intercepts syscallsUntrusted workloads; some syscalls unsupported
Kata ContainersLightweight VM per PodStrong isolation; needs virtualisation support

In Kubernetes, an alternative runtime is selected with a RuntimeClass that maps to a handler configured in containerd or CRI-O.

Reading runc start errors

Error textUsual cause
exec: "x": executable file not found in $PATHWrong entrypoint, or binary missing in the image
exec format errorBinary built for another CPU architecture, or script without a shebang
no such file or directory on an existing scriptWindows line endings (\r) in the shebang line
permission deniedMissing execute bit, or noexec mount
Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

Common mistakes

  • Running custom runtimes without compatibility testing.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Terminology layer

Terms & aliases

Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.

Aliases that resolve here
runc and oci runtime specrunc oci runtimeOCI runtime create failed
Confirmation

Confirm action

Continue?