Skip to main content

How does runc actually create a container process from an OCI bundle?

Expert Docker
Quick Answer runc receives an OCI bundle: a config.json describing the container spec (namespaces, cgroups, mounts, capabilities) and a rootfs directory. runc creates the Linux namespaces, applies cgroup limits, sets up mounts, drops capabilities, and then executes the container's entry process. After handoff, runc exits and the shim takes over.

Answer

runc reads the OCI spec, sets namespaces, configures cgroups, mounts rootfs using pivot_root, drops capabilities, and execve()s the entrypoint to create an isolated environment.
S
SugharaIQ Editorial Team Verified Answer

This answer has been peer-reviewed by industry experts holding senior engineering roles to ensure technical accuracy and relevance for modern interview standards.

Want to bookmark, take notes, or join discussions?

Sign in to access all features and personalize your learning experience.

Sign In Create Account

Source: SugharaIQ

Ready to level up? Start Practice