parse

package
v1.16.6 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2020 License: Apache-2.0 Imports: 20 Imported by: 45

Documentation

Index

Constants

View Source
const (
	// SeccompDefaultPath defines the default seccomp path
	SeccompDefaultPath = "/usr/share/containers/seccomp.json"
	// SeccompOverridePath if this exists it overrides the default seccomp path
	SeccompOverridePath = "/etc/crio/seccomp.json"
	// TypeBind is the type for mounting host dir
	TypeBind = "bind"
	// TypeTmpfs is the type for mounting tmpfs
	TypeTmpfs = "tmpfs"
)

Variables

This section is empty.

Functions

func CommonBuildOptions

func CommonBuildOptions(c *cobra.Command) (*buildah.CommonBuildOptions, error)

CommonBuildOptions parses the build options from the bud cli

func DefaultPlatform added in v1.13.2

func DefaultPlatform() string

DefaultPlatform returns the standard platform for the current system

func Device added in v1.11.1

func Device(device string) (string, string, string, error)

Device parses device mapping string to a src, dest & permissions string Valid values for device looklike:

'/dev/sdc"
'/dev/sdc:/dev/xvdc"
'/dev/sdc:/dev/xvdc:rwm"
'/dev/sdc:rm"

func DeviceFromPath added in v1.11.1

func DeviceFromPath(device string) ([]configs.Device, error)

func GetBindMount added in v1.9.1

func GetBindMount(args []string) (specs.Mount, error)

GetBindMount parses a single bind mount entry from the --mount flag.

func GetTempDir added in v1.13.0

func GetTempDir() string

func GetTmpfsMount added in v1.9.1

func GetTmpfsMount(args []string) (specs.Mount, error)

GetTmpfsMount parses a single tmpfs mount entry from the --mount flag

func GetVolumes added in v1.9.1

func GetVolumes(volumes []string, mounts []string) ([]specs.Mount, error)

GetVolumes gets the volumes from --volume and --mount

func IDMappingOptions

func IDMappingOptions(c *cobra.Command, isolation buildah.Isolation) (usernsOptions buildah.NamespaceOptions, idmapOptions *buildah.IDMappingOptions, err error)

IDMappingOptions parses the build options related to user namespaces and ID mapping.

func IsolationOption

func IsolationOption(isolation string) (buildah.Isolation, error)

IsolationOption parses the --isolation flag.

func NamespaceOptions

func NamespaceOptions(c *cobra.Command) (namespaceOptions buildah.NamespaceOptions, networkPolicy buildah.NetworkConfigurationPolicy, err error)

NamespaceOptions parses the build options for all namespaces except for user namespace.

func PlatformFromOptions added in v1.13.2

func PlatformFromOptions(c *cobra.Command) (os, arch string, err error)

PlatformFromOptions parses the operating system (os) and architecture (arch) from the provided command line options.

func SystemContextFromOptions

func SystemContextFromOptions(c *cobra.Command) (*types.SystemContext, error)

SystemContextFromOptions returns a SystemContext populated with values per the input parameters provided by the caller for the use in authentication.

func ValidateVolumeCtrDir added in v1.8.3

func ValidateVolumeCtrDir(ctrDir string) error

ValidateVolumeCtrDir validates a volume mount's destination directory.

func ValidateVolumeHostDir added in v1.8.3

func ValidateVolumeHostDir(hostDir string) error

ValidateVolumeHostDir validates a volume mount's source directory

func ValidateVolumeOpts added in v1.8.3

func ValidateVolumeOpts(options []string) ([]string, error)

ValidateVolumeOpts validates a volume's options

func Volume added in v1.10.0

func Volume(volume string) (specs.Mount, error)

Volume parses the input of --volume

func Volumes added in v1.10.0

func Volumes(volumes []string) error

Volumes validates the host and container paths passed in to the --volume flag

Types

This section is empty.

Jump to

Keyboard shortcuts

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