Documentation
¶
Index ¶
Constants ¶
View Source
const (
// UsernsEnvName is the environment variable, if set indicates in rootless mode
UsernsEnvName = "_CONTAINERS_USERNS_CONFIGURED"
)
Variables ¶
This section is empty.
Functions ¶
func ExecRunnable ¶
func ExecRunnable(cmd Runnable)
ExecRunnable runs the specified unshare command, captures its exit status, and exits with the same status.
func GetRootlessUID ¶
func GetRootlessUID() int
GetRootlessUID returns the UID of the user in the parent userNS
func MaybeReexecUsingUserNamespace ¶
func MaybeReexecUsingUserNamespace(evenForRoot bool)
MaybeReexecUsingUserNamespace re-exec the process in a new namespace
func RootlessEnv ¶
func RootlessEnv() []string
RootlessEnv returns the environment settings for the rootless containers
Types ¶
type Cmd ¶
type Cmd struct {
*exec.Cmd
UseNewuidmap bool
UidMappings []specs.LinuxIDMapping
UseNewgidmap bool
GidMappings []specs.LinuxIDMapping
GidMappingsEnableSetgroups bool
Setsid bool
Setpgrp bool
Ctty *os.File
OOMScoreAdj *int
Hook func(pid int) error
}
Cmd wraps an exec.Cmd created by the reexec package in unshare(), and handles setting ID maps and other related settings by triggering initialization code in the child.
func (*Cmd) CombinedOutput ¶
Click to show internal directories.
Click to hide internal directories.