Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRunner ¶
func NewRunner(id string, ldconfigPath string, containerRoot string, additionalargs ...string) (*exec.Cmd, error)
NewRunner creates an exec.Cmd that can be used to run ldconfig.
func SafeExec ¶
SafeExec replaces the calling process with the program held in file (a sealed memfd, see cloneLdconfigIntoMemfd), executed by descriptor via execveat(fd, "", argv, envp, AT_EMPTY_PATH) -- no path lookup, so this works identically whether or not /proc is mounted anywhere in the caller's current namespaces. Never returns on success.
Types ¶
type Ldconfig ¶
type Ldconfig struct {
// contains filtered or unexported fields
}
func NewFromArgs ¶ added in v1.18.1
NewFromArgs creates an Ldconfig struct from the args passed to the Cmd above. This struct is used to perform operations on the ldcache and libraries in a particular root (e.g. a container).
args[0] is the reexec initializer function name and is required.
The following flags are required:
--ldconfig-path=LDCONFIG_PATH the path to ldconfig on the host --container-root=CONTAINER_ROOT the path in which ldconfig must be run
The following flags are optional:
--is-debian-like-host Indicates that the host system is debian-like (e.g. Debian, Ubuntu)
as opposed to non-Debian-like (e.g. RHEL, Fedora)
See https://github.com/NVIDIA/nvidia-container-toolkit/pull/1444
--no-pivot pivot_root should not be used to provide process isolation.
The remaining args are folders where soname symlinks need to be created.