Documentation ¶
Index ¶
- Constants
- func BlockAccessToKernelFilesystems(privileged, pidModeIsHost bool, g *generate.Generator)
- func CompleteSpec(ctx context.Context, r *libpod.Runtime, s *specgen.SpecGenerator) ([]string, error)
- func CreateExitCommandArgs(storageConfig storage.StoreOptions, config *config.Config, ...) ([]string, error)
- func Device(d *configs.Device) spec.LinuxDevice
- func DevicesFromPath(g *generate.Generator, devicePath string) error
- func GetAvailableGids() (int64, error)
- func GetDefaultNamespaceMode(nsType string, cfg *config.Config, pod *libpod.Pod) (specgen.Namespace, error)
- func GetNamespaceOptions(ns []string) ([]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) (*libpod.Container, error)
- func MakePod(p *specgen.PodSpecGenerator, rt *libpod.Runtime) (*libpod.Pod, error)
- func ParseDevice(device string) (string, string, string, error)
- func SpecGenToOCI(ctx context.Context, s *specgen.SpecGenerator, rt *libpod.Runtime, ...) (*spec.Spec, error)
- func SupercedeUserMounts(mounts []spec.Mount, configMount []spec.Mount) []spec.Mount
Constants ¶
const ( // TypeBind is the type for mounting host dir TypeBind = "bind" // TypeVolume is the type for named volumes TypeVolume = "volume" // TypeTmpfs is the type for mounting tmpfs TypeTmpfs = "tmpfs" )
TODO unify this in one place - maybe libpod/define
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 Device ¶
func Device(d *configs.Device) spec.LinuxDevice
Device transforms a libcontainer configs.Device to a specs.LinuxDevice object.
func DevicesFromPath ¶
DevicesFromPath computes a list of devices
func GetAvailableGids ¶
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) ([]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) (*libpod.Container, 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 ParseDevice ¶
ParseDevice parses device mapping string to a src, dest & permissions string
func SpecGenToOCI ¶
func SupercedeUserMounts ¶
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.