Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToRootless ¶
func ToRootless(spec *specs.Spec, opts *RootlessOpts) error
ToRootless converts the given spec file into one that should work with rootless containers, by removing incompatible options and adding others that are needed.
func ToRootlessWithContext ¶
func ToRootlessWithContext(ctx RootlessContext, spec *specs.Spec, opts *RootlessOpts) error
ToRootlessWithContext converts the spec with the run-time context. ctx can be internally modified for sorting.
Types ¶
type RootlessContext ¶
type RootlessContext struct { EUID uint32 EGID uint32 SubUIDs []user.SubID SubGIDs []user.SubID UIDMap []user.IDMap GIDMap []user.IDMap InUserNS bool }
Run-time context for ToRootless.
type RootlessOpts ¶
type RootlessOpts struct { // Add sub{u,g}id to spec.Linux.{U,G}IDMappings. // Requires newuidmap(1) and newgidmap(1) with suid bit. // Ignored when running in userns. MapSubUIDGID bool }
RootlessOpts is an optional spec for ToRootless
Click to show internal directories.
Click to hide internal directories.