Use it to understand low-level container start failures.
runc and OCI Runtime Spec
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.
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.
OCI bundle → runc create/start → container process
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
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.
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).
runc --version— runtime versiondocker ps -a— containers and exit codesdocker logs <c>— container outputdocker 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
| Runtime | Isolation | Typical use |
|---|---|---|
| runc | Namespaces + cgroups (shared kernel) | Default almost everywhere |
| crun | Same as runc, written in C | Faster start, lower memory; default in some Podman setups |
gVisor (runsc) | User-space kernel intercepts syscalls | Untrusted workloads; some syscalls unsupported |
| Kata Containers | Lightweight VM per Pod | Strong 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 text | Usual cause |
|---|---|
exec: "x": executable file not found in $PATH | Wrong entrypoint, or binary missing in the image |
exec format error | Binary built for another CPU architecture, or script without a shebang |
no such file or directory on an existing script | Windows line endings (\r) in the shebang line |
permission denied | Missing execute bit, or noexec mount |
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
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.