specgenutil

package
v5.3.1 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: Apache-2.0 Imports: 30 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateExitCommandArgs

func CreateExitCommandArgs(storageConfig storageTypes.StoreOptions, config *config.Config, syslog, rm, rmi, exec bool) ([]string, error)

func CreateExpose

func CreateExpose(expose []string) (map[uint16]string, error)

CreateExpose parses user-provided exposed port definitions and converts them into SpecGen format. TODO: The SpecGen format should really handle ranges more sanely - we could be massively inflating what is sent over the wire with a large range.

func CreatePortBindings

func CreatePortBindings(ports []string) ([]types.PortMapping, error)

CreatePortBindings iterates ports mappings into SpecGen format.

func GenRlimits

func GenRlimits(ulimits []string) ([]specs.POSIXRlimit, error)

func GetResources

func GetResources(s *specgen.SpecGenerator, c *entities.ContainerCreateOptions) (*specs.LinuxResources, error)

func LimitToSwap

func LimitToSwap(memory *specs.LinuxMemory, swap string, ml int64)

func Mounts

func Mounts(mountFlag []string, configMounts []string) (map[string]spec.Mount, map[string]*specgen.NamedVolume, map[string]*specgen.ImageVolume, error)

Mounts takes user-provided input from the --mount flag as well as Mounts specified in containers.conf and creates OCI spec mounts and Libpod named volumes. podman run --mount type=bind,src=/etc/resolv.conf,target=/etc/resolv.conf ... podman run --mount type=tmpfs,target=/dev/shm ... podman run --mount type=volume,source=test-volume, ...

func ReadPodIDFile

func ReadPodIDFile(path string) (string, error)

ReadPodIDFile reads the specified file and returns its content (i.e., first line).

func ReadPodIDFiles

func ReadPodIDFiles(files []string) ([]string, error)

ReadPodIDFiles reads the specified files and returns their content (i.e., first line).

Types

This section is empty.

Jump to

Keyboard shortcuts

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