Documentation ¶
Index ¶
- func BlockAccessToKernelFilesystems(privileged, pidModeIsHost bool, mask, unmask []string, g *generate.Generator)
- func CompleteSpec(ctx context.Context, r *libpod.Runtime, s *specgen.SpecGenerator) ([]string, error)
- func CreateExitCommandArgs(storageConfig types.StoreOptions, config *config.Config, syslog, rm, exec bool) ([]string, error)
- func DevicesFromPath(g *generate.Generator, devicePath string) error
- func ExecuteCreate(ctx context.Context, rt *libpod.Runtime, runtimeSpec *spec.Spec, ...) (*libpod.Container, error)
- func GenExposedPorts(exposedPorts map[string]struct{}) (map[uint16]string, error)
- func GetDefaultNamespaceMode(nsType string, cfg *config.Config, pod *libpod.Pod) (specgen.Namespace, error)
- func GetNamespaceOptions(ns []string, netnsIsHost bool) ([]libpod.PodCreateOption, error)
- func InitFSMounts(mounts []spec.Mount) error
- func IsValidDeviceMode(mode string) bool
- func MakeContainer(ctx context.Context, rt *libpod.Runtime, s *specgen.SpecGenerator) (*spec.Spec, *specgen.SpecGenerator, []libpod.CtrCreateOption, error)
- func MakePod(p *entities.PodSpec, rt *libpod.Runtime) (*libpod.Pod, error)
- func MapSpec(p *specgen.PodSpecGenerator) (*specgen.SpecGenerator, error)
- func ParseDevice(device string) (string, string, string, error)
- func ParsePortMapping(portMappings []types.PortMapping) ([]ocicni.PortMapping, map[string]map[string]map[uint16]uint16, ...)
- func SpecGenToOCI(ctx context.Context, s *specgen.SpecGenerator, rt *libpod.Runtime, ...) (*spec.Spec, error)
- func SupersedeUserMounts(mounts []spec.Mount, configMount []spec.Mount) []spec.Mount
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompleteSpec ¶
func CompleteSpec(ctx context.Context, r *libpod.Runtime, s *specgen.SpecGenerator) ([]string, error)
Fill any missing parts of the spec generator (e.g. from the image). Returns a set of warnings or any fatal error that occurred.
func CreateExitCommandArgs ¶
func DevicesFromPath ¶
DevicesFromPath computes a list of devices
func ExecuteCreate ¶ added in v3.4.0
func GenExposedPorts ¶ added in v3.3.0
func GetDefaultNamespaceMode ¶
func GetDefaultNamespaceMode(nsType string, cfg *config.Config, pod *libpod.Pod) (specgen.Namespace, error)
Get the default namespace mode for any given namespace type.
func GetNamespaceOptions ¶
func GetNamespaceOptions(ns []string, netnsIsHost bool) ([]libpod.PodCreateOption, error)
GetNamespaceOptions transforms a slice of kernel namespaces into a slice of pod create options. Currently, not all kernel namespaces are supported, and they will be returned in an error
func InitFSMounts ¶
func IsValidDeviceMode ¶
IsValidDeviceMode checks if the mode for device is valid or not. IsValid mode is a composition of r (read), w (write), and m (mknod).
func MakeContainer ¶
func MakeContainer(ctx context.Context, rt *libpod.Runtime, s *specgen.SpecGenerator) (*spec.Spec, *specgen.SpecGenerator, []libpod.CtrCreateOption, error)
MakeContainer creates a container based on the SpecGenerator. Returns the created, container and any warnings resulting from creating the container, or an error.
func MapSpec ¶ added in v3.4.0
func MapSpec(p *specgen.PodSpecGenerator) (*specgen.SpecGenerator, error)
MapSpec modifies the already filled Infra specgenerator, replacing necessary values with those specified in pod creation
func ParseDevice ¶
ParseDevice parses device mapping string to a src, dest & permissions string
func ParsePortMapping ¶ added in v3.3.0
func ParsePortMapping(portMappings []types.PortMapping) ([]ocicni.PortMapping, map[string]map[string]map[uint16]uint16, map[string]map[string]map[uint16]uint16, error)
Parse port maps to OCICNI port mappings. Returns a set of OCICNI port mappings, and maps of utilized container and host ports.
func SpecGenToOCI ¶
func SpecGenToOCI(ctx context.Context, s *specgen.SpecGenerator, rt *libpod.Runtime, rtc *config.Config, newImage *libimage.Image, mounts []spec.Mount, pod *libpod.Pod, finalCmd []string) (*spec.Spec, error)
SpecGenToOCI returns the base configuration for the container.
func SupersedeUserMounts ¶
Supersede existing mounts in the spec with new, user-specified mounts. TODO: Should we unmount subtree mounts? E.g., if /tmp/ is mounted by one mount, and we already have /tmp/a and /tmp/b, should we remove the /tmp/a and /tmp/b mounts in favor of the more general /tmp?
Types ¶
This section is empty.