ociruntimeutil

package
v2.4.0-beta.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 22, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

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

func BinaryFromRuntimeStr(runtimeStr string) (string, error)

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

func Features(binary string) (*features.Features, error)

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

func SupportsRecursivelyReadOnly(runtimeStr string) error

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL