LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

crun

fast OCI container runtime

TLDR

Run a container from OCI bundle
$ crun run [container_id]
copy
Create a container without starting it
$ crun create [container_id]
copy
Start a created container
$ crun start [container_id]
copy
List running containers
$ crun list
copy
Execute a command in a running container
$ crun exec [container_id] [command]
copy
Delete a container
$ crun delete [container_id]
copy
Get container state
$ crun state [container_id]
copy
Pause all processes in a container
$ crun pause [container_id]
copy
Show processes running in a container
$ crun ps [container_id]
copy

SYNOPSIS

crun [global-options] command [command-options] [arguments]

DESCRIPTION

crun is a fast and low-memory footprint OCI container runtime written in C. It is fully compatible with the OCI (Open Container Initiative) runtime specification and can be used as a drop-in replacement for runc.crun implements all required OCI runtime operations including container creation, execution, and lifecycle management. It supports Linux namespaces, cgroups v1 and v2, seccomp, and other container isolation features.The runtime is designed to be lightweight and efficient, with significantly faster startup times and lower memory usage compared to Go-based runtimes. It's used by container engines like Podman and Buildah.

PARAMETERS

run ID

Create and start a container from an OCI bundle.
create ID
Create a container but don't start it.
start ID
Start a previously created container.
exec ID CMD
Execute a command in a running container.
delete ID
Delete a container.
kill ID [SIGNAL]
Send a signal to the container's init process.
list
List containers.
state ID
Output the state of a container.
pause ID
Pause all processes in the container.
resume ID
Resume the processes in the container.
ps ID
Show the processes running in a container.
update ID
Update container resource constraints.
spec
Create a new OCI bundle specification.
checkpoint ID
Checkpoint a running container using CRIU.
--root DIR
Root directory for container state.
--debug
Produce verbose output.
--log=DESTINATION
Define destination for error and warning messages (file:PATH, journald:ID, or syslog:ID).
--systemd-cgroup
Use systemd for configuring cgroups.
--cgroup-manager=MANAGER
Specify cgroup manager (cgroupfs, systemd, or disabled).

CAVEATS

Requires root privileges or appropriate user namespace configuration. OCI bundle must be properly configured with config.json and rootfs. crun operates on OCI bundles, not container images directly.

HISTORY

crun was developed by Giuseppe Scrivano at Red Hat as a faster alternative to runc. First released around 2019, it gained adoption due to its performance benefits. It became the default runtime for Podman and is supported by Kubernetes through CRI-O.

SEE ALSO

runc(1), podman(1), buildah(1), containerd(1), docker(1)

Copied to clipboard
Kai