Documentation
¶
Overview ¶
Package ociruntimeutil provides client-side utilities for inspecting OCI runtimes such as runc and crun.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BinaryFromRuntimeStr ¶
BinaryFromRuntimeStr resolves the path of the OCI runtime binary from runtimeStr, which is the value of the `--runtime` flag of `nerdctl run`, e.g., "" (default), "io.containerd.runc.v2", "crun", or "/usr/local/sbin/runc".
An error is returned when the binary cannot be determined, e.g., for a shim like "io.containerd.kata.v2" that does not expose the runtime binary name.
The resolution is a best-effort guess of the client and may not match the actual binary used by the containerd daemon, e.g., when the daemon overrides the BinaryName option of the "io.containerd.runc.v2" shim in its config.
func Features ¶
Features returns the parsed output of `<binary> features`. https://github.com/opencontainers/runtime-spec/blob/v1.2.1/features.md
The `features` subcommand is supported by runc >= 1.1 and crun >= 1.8.6.
The result is cached in the XDG cache directory (e.g., ~/.cache/nerdctl/oci-runtime-features), with the cache entry being invalidated when the binary is modified.
func SupportsRecursivelyReadOnly ¶
SupportsRecursivelyReadOnly returns nil when the kernel and the OCI runtime specified by runtimeStr (the value of the `--runtime` flag) support recursive read-only (RRO) bind mounts. The result is cached per runtimeStr for the lifetime of the process.
Types ¶
This section is empty.