Pcornel
Containers · Container Runtimes

runc and OCI Runtime Spec

Cheat sheet · https://pcornel.dk/topic.php?topic=6128

Back to the Topic

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.

Remember

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).

First checks

  • runc --version — runtime version
  • docker ps -a — containers and exit codes
  • docker logs <c> — container output
  • docker inspect <c> — config, mounts, network, state

Verify in this order

OCI bundle → runc create/start → container process

Where it usually breaks

An entrypoint script with Windows line endings fails with no such file or directory.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=6128

Confirmation

Confirm action

Continue?