Documentation ¶
Index ¶
- Variables
- func ExitCode(err error) int
- func FindDeviceNodes() (map[string]string, error)
- func GetContainerPidInformationDescriptors() ([]string, error)
- func GetGlobalOpts(c *cliconfig.RunlabelValues) string
- func GetRootlessConfigHomeDir() (string, error)
- func GetRootlessPauseProcessPidPath() (string, error)
- func GetRuntimeDir() (string, error)
- func HomeDir() (string, error)
- func OpenExclusiveFile(path string) (*os.File, error)
- func ParseIDMapping(mode namespaces.UsernsMode, uidMapSlice, gidMapSlice []string, ...) (*storage.IDMappingOptions, error)
- func ParseInputTime(inputTime string) (time.Time, error)
- func ParseRegistryCreds(creds string) (*types.DockerAuthConfig, error)
- func ParseSignal(rawSignal string) (syscall.Signal, error)
- func ProcessOptions(options []string, isTmpfs bool, sourcePath string) ([]string, error)
- func StringInSlice(s string, sl []string) bool
- func Tmpdir() string
- func ValidateSysctls(strSlice []string) (map[string]string, error)
- func WriteStorageConfigFile(storageOpts *storage.StoreOptions, storageConf string) error
- type ImageConfig
- type PullType
Constants ¶
This section is empty.
Variables ¶
var ( // ErrBadMntOption indicates that an invalid mount option was passed. ErrBadMntOption = errors.Errorf("invalid mount option") // ErrDupeMntOption indicates that a duplicate mount option was passed. ErrDupeMntOption = errors.Errorf("duplicate mount option passed") )
Functions ¶
func ExitCode ¶ added in v1.6.0
ExitCode reads the error message when failing to executing container process and then returns 0 if no error, 126 if command does not exist, or 127 for all other errors
func FindDeviceNodes ¶ added in v1.5.0
FindDeviceNodes parses /dev/ into a set of major:minor -> path, where [major:minor] is the device's major and minor numbers formatted as, for example, 2:0 and path is the path to the device node. Symlinks to nodes are ignored.
func GetContainerPidInformationDescriptors ¶ added in v1.4.4
GetContainerPidInformationDescriptors returns a string slice of all supported format descriptors of GetContainerPidInformation.
func GetGlobalOpts ¶ added in v1.3.0
func GetGlobalOpts(c *cliconfig.RunlabelValues) string
GetGlobalOpts checks all global flags and generates the command string FIXME: Port input to config.Config TODO: Is there a "better" way to reverse values to flags? This seems brittle.
func GetRootlessConfigHomeDir ¶ added in v1.5.0
GetRootlessConfigHomeDir returns the config home directory when running as non root
func GetRootlessPauseProcessPidPath ¶ added in v1.4.0
GetRootlessPauseProcessPidPath returns the path to the file that holds the pid for the pause process
func GetRuntimeDir ¶ added in v1.6.0
GetRuntimeDir returns the runtime directory
func OpenExclusiveFile ¶ added in v1.4.4
OpenExclusiveFile opens a file for writing and ensure it doesn't already exist
func ParseIDMapping ¶ added in v0.5.2
func ParseIDMapping(mode namespaces.UsernsMode, uidMapSlice, gidMapSlice []string, subUIDMap, subGIDMap string) (*storage.IDMappingOptions, error)
ParseIDMapping takes idmappings and subuid and subgid maps and returns a storage mapping
func ParseInputTime ¶ added in v1.2.0
ParseInputTime takes the users input and to determine if it is valid and returns a time format and error. The input is compared to known time formats or a duration which implies no-duration
func ParseRegistryCreds ¶
func ParseRegistryCreds(creds string) (*types.DockerAuthConfig, error)
ParseRegistryCreds takes a credentials string in the form USERNAME:PASSWORD and returns a DockerAuthConfig
func ParseSignal ¶ added in v1.7.0
ParseSignal parses and validates a signal name or number.
func ProcessOptions ¶ added in v1.3.0
ProcessOptions parses the options for a bind or tmpfs mount and ensures that they are sensible and follow convention. The isTmpfs variable controls whether extra, tmpfs-specific options will be allowed. The sourcePath variable, if not empty, contains a bind mount source.
func StringInSlice ¶ added in v0.3.3
StringInSlice determines if a string is in a string slice, returns bool
func ValidateSysctls ¶ added in v1.9.0
ValidateSysctls validates a list of sysctl and returns it.
func WriteStorageConfigFile ¶ added in v1.2.0
func WriteStorageConfigFile(storageOpts *storage.StoreOptions, storageConf string) error
WriteStorageConfigFile writes the configuration to a file
Types ¶
type ImageConfig ¶ added in v1.7.0
type ImageConfig struct { v1.ImageConfig OnBuild []string }
ImageConfig is a wrapper around the OCIv1 Image Configuration struct exported by containers/image, but containing additional fields that are not supported by OCIv1 (but are by Docker v2) - notably OnBuild.
func GetImageConfig ¶ added in v0.4.4
func GetImageConfig(changes []string) (ImageConfig, error)
GetImageConfig produces a v1.ImageConfig from the --change flag that is accepted by several Podman commands. It accepts a (limited subset) of Dockerfile instructions.
type PullType ¶ added in v1.6.0
type PullType int
PullType whether to pull new image
func ValidatePullType ¶ added in v1.6.0
ValidatePullType check if the pullType from CLI is valid and returns the valid enum type if the value from CLI is invalid returns the error