specconv

package
v0.0.0-...-dbf67a6 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

README

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

Jump to

Keyboard shortcuts

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