Documentation
¶
Overview ¶
Package rootless implements a daemon-free container runtime for YAP using go-containerregistry for image pulls and rootlesskit for isolated execution.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MaybeRunAsChild ¶
func MaybeRunAsChild()
MaybeRunAsChild checks whether the current process was re-executed as the rootlesskit child. If so, it completes the child initialisation and runs the target command inside the new user namespace, then exits.
Call this as early as possible in main(), before cobra runs.
func PullImage ¶
PullImage pulls the YAP builder image for distro from the registry (no CLI required) and extracts it to a local rootfs directory.
func RootfsExists ¶
RootfsExists returns true if a rootfs has already been extracted for distro.
func RunInRootless ¶
RunInRootless runs args inside the distro rootfs using rootlesskit for user-namespace isolation. workDir is bind-mounted as /workspace.
Types ¶
type Runtime ¶
type Runtime struct{}
Runtime implements the container.Runtime interface using in-process image pull and rootlesskit for user-namespace isolation.
func (*Runtime) Run ¶
Run executes args inside the distro rootfs with workDir bind-mounted as /workspace.
func (*Runtime) Type ¶
func (r *Runtime) Type() runtimetype.RuntimeType
Type returns the runtime type identifier.