runc(8)

๐Ÿ’– runc โ€” bestie's guide to the Open Container Initiative runtime ๐Ÿ’–

okay so this is the runc(8) page from the System Manager's Manual, and honestly? it's giving main character energy. let's get into it ๐Ÿซถ


โœจ NAME โœจ

runc โ€” the Open Container Initiative runtime ๐ŸŒˆ


โœจ SYNOPSIS โœจ

runc [global-option ...] command [command-option ...] [argument ...]

โœจ DESCRIPTION โœจ

so runc is a command line client for running applications that are packaged according to the Open Container Initiative (OCI) format, and it's a compliant implementation of the Open Container Initiative specification. yes bestie, it actually follows the spec, no cap ๐Ÿ’…

runc integrates so well with your existing process supervisors โ€” like, it just fits right in โ€” and it gives you a production container runtime environment for your apps. you can use it with whatever process monitoring tools you already have, and the container will be spawned as a direct child of the process supervisor. iconic behaviour fr fr ๐Ÿ‘‘

containers get configured using bundles. a bundle for a container is a directory that includes:

  • a specification file named config.json
  • a root filesystem

and that root filesystem contains the contents of the container. periodt.

to run a new instance of a container:

# runc run [ -b bundle ] container-id

where container-id is your name for the instance of the container you're starting. and heads up: the name you give the container instance must be unique on your host. no duplicates allowed, that's the vibe check ๐Ÿšซ

providing the bundle directory using -b is optional โ€” the default value for bundle is the current directory. easy peasy ๐Ÿ“


โœจ COMMANDS โœจ

  • checkpoint โ€” Checkpoint a running container. See runc-checkpoint(8).
  • create โ€” Create a container. See runc-create(8).
  • delete โ€” Delete any resources held by the container; often used with detached containers. See runc-delete(8).
  • events โ€” Display container events, such as OOM notifications, CPU, memory, I/O and network statistics. See runc-events(8).
  • exec โ€” Execute a new process inside the container. See runc-exec(8).
  • kill โ€” Send a specified signal to the container's init process. See runc-kill(8).
  • list โ€” List containers started by runc with the given --root. See runc-list(8).
  • pause โ€” Suspend all processes inside the container. See runc-pause(8).
  • ps โ€” Show processes running inside the container. See runc-ps(8).
  • restore โ€” Restore a container from a previous checkpoint. See runc-restore(8).
  • resume โ€” Resume all processes that have been previously paused. See runc-resume(8).
  • run โ€” Create and start a container. See runc-run(8).
  • spec โ€” Create a new specification file (config.json). See runc-spec(8).
  • start โ€” Start a container previously created by runc create. See runc-start(8).
  • state โ€” Show the container state. See runc-state(8).
  • update โ€” Update container resource constraints. See runc-update(8).
  • help, h โ€” Show a list of commands or help for a particular command.

โœจ GLOBAL OPTIONS โœจ

okay so these options work with any command, but listen โ€” they must precede the command. order matters, bestie ๐Ÿ˜ค

  • --debug โ€” Enable debug logging.
  • --log path โ€” Set the log destination to path. The default is to log to stderr.
  • --log-format text|json โ€” Set the log format (default is text).
  • --root path โ€” Set the root directory to store containers' state. The path should be located on tmpfs. Default is /run/runc, or $XDG_RUNTIME_DIR/runc for rootless containers.
  • --systemd-cgroup โ€” Enable systemd cgroup support. If this is set, the container spec (config.json) is expected to have cgroupsPath value in the slice:prefix:name form (e.g. system.slice:runc:434234).
  • --rootless true|false|auto โ€” Enable or disable rootless mode. Default is auto, meaning to auto-detect whether rootless should be enabled.
  • --help|-h โ€” Show help.
  • --version|-v โ€” Show version.

โœจ SEE ALSO โœจ

runc-checkpoint(8), runc-create(8), runc-delete(8), runc-events(8), runc-exec(8), runc-kill(8), runc-list(8), runc-pause(8), runc-ps(8), runc-restore(8), runc-resume(8), runc-run(8), runc-spec(8), runc-start(8), runc-state(8), runc-update(8). ๐Ÿฆ‹


and that's the whole page bestie!! the source line at the bottom just reads runc(8) โ€” that's the source/version-and-date footer, no extra version digits or date hiding in there, so this is literally the entire thing, start to finish ๐Ÿ’œโœจ go run some containers, you absolute legend ๐ŸŒธ๐ŸŽ€

๐Ÿ“ฆ where this page comes from