LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

runc

Low-level OCI container runtime

TLDR

Run container
$ runc run [container-id]
copy
Create container
$ runc create [container-id]
copy
Start container
$ runc start [container-id]
copy
List containers
$ runc list
copy
Kill container
$ runc kill [container-id]
copy
Delete container
$ runc delete [container-id]
copy
Execute command in running container
$ runc exec [container-id] [command]
copy
Show container state
$ runc state [container-id]
copy
Generate OCI spec file
$ runc spec
copy
Show processes running in container
$ runc ps [container-id]
copy

SYNOPSIS

runc [options] command [args...]

DESCRIPTION

runc is a CLI tool for spawning and running containers according to the OCI specification. It's the reference implementation of the Open Container Initiative runtime specification.The tool provides low-level container runtime functionality, used by Docker, containerd, and other container platforms.

PARAMETERS

run id

Create and start container.
create id
Create container.
start id
Start created container.
list
List containers.
state id
Output container state.
kill id [signal]
Send signal to container.
delete id
Delete container.
exec id cmd
Execute new process inside container.
pause id
Suspend all processes inside container.
resume id
Resume previously paused processes.
ps id
Show processes running inside container.
events id
Display container events (OOM, CPU, memory, I/O stats).
update id
Update container resource constraints.
checkpoint id
Checkpoint a running container.
restore id
Restore container from a previous checkpoint.
spec
Generate new OCI spec file (config.json).
--root dir
Root directory for container state storage (should be on tmpfs).
--debug
Enable debug logging.
--log path
Set log file path (default: stderr).
--log-format text|json
Set log format (default: text).
--systemd-cgroup
Enable systemd cgroup support.
--rootless true|false|auto
Enable or disable rootless mode (default: auto).

CAVEATS

Requires OCI bundle. Low-level tool - usually not used directly. Needs root for full functionality. Container must be configured properly.

HISTORY

runc was developed as part of the Open Container Initiative (OCI) by Docker and others in 2015. It standardized container runtime behavior, enabling interoperability between container platforms.

SEE ALSO

docker(1), containerd(8), podman(1), crun(1)

Copied to clipboard
Kai