Documentation ¶
Index ¶
- Constants
- func AuthConfig(creds string) (*types.DockerAuthConfig, error)
- func CommonBuildOptions(c *cobra.Command) (*define.CommonBuildOptions, error)
- func DefaultPlatform() string
- func Device(device string) (string, string, string, error)
- func DeviceFromPath(device string) (define.ContainerDevices, error)
- func GetBindMount(args []string) (specs.Mount, error)
- func GetTempDir() string
- func GetTmpfsMount(args []string) (specs.Mount, error)
- func GetVolumes(volumes []string, mounts []string) ([]specs.Mount, error)
- func IDMappingOptions(c *cobra.Command, isolation define.Isolation) (usernsOptions define.NamespaceOptions, idmapOptions *define.IDMappingOptions, ...)
- func IsolationOption(isolation string) (define.Isolation, error)
- func NamespaceOptions(c *cobra.Command) (namespaceOptions define.NamespaceOptions, ...)
- func Platform(platform string) (os, arch, variant string, err error)
- func PlatformFromOptions(c *cobra.Command) (os, arch string, err error)
- func PlatformsFromOptions(c *cobra.Command) (platforms []struct{ ... }, err error)
- func SSH(sshSources []string) (map[string]*sshagent.Source, error)
- func Secrets(secrets []string) (map[string]string, error)
- func SystemContextFromOptions(c *cobra.Command) (*types.SystemContext, error)
- func ValidateVolumeCtrDir(ctrDir string) error
- func ValidateVolumeHostDir(hostDir string) error
- func ValidateVolumeOpts(options []string) ([]string, error)
- func Volume(volume string) (specs.Mount, error)
- func Volumes(volumes []string) error
Constants ¶
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 AuthConfig ¶ added in v1.22.0
func AuthConfig(creds string) (*types.DockerAuthConfig, error)
AuthConfig parses the creds in format [username[:password] into an auth config.
func CommonBuildOptions ¶
func CommonBuildOptions(c *cobra.Command) (*define.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
Device parses device mapping string to a src, dest & permissions string Valid values for device look like:
'/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) (define.ContainerDevices, error)
func GetBindMount ¶ added in v1.9.1
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
GetTmpfsMount parses a single tmpfs mount entry from the --mount flag
func GetVolumes ¶ added in v1.9.1
GetVolumes gets the volumes from --volume and --mount
func IDMappingOptions ¶
func IDMappingOptions(c *cobra.Command, isolation define.Isolation) (usernsOptions define.NamespaceOptions, idmapOptions *define.IDMappingOptions, err error)
IDMappingOptions parses the build options related to user namespaces and ID mapping.
func IsolationOption ¶
IsolationOption parses the --isolation flag.
func NamespaceOptions ¶
func NamespaceOptions(c *cobra.Command) (namespaceOptions define.NamespaceOptions, networkPolicy define.NetworkConfigurationPolicy, err error)
NamespaceOptions parses the build options for all namespaces except for user namespace.
func Platform ¶ added in v1.20.1
Platform separates the platform string into os, arch and variant, accepting any of $arch, $os/$arch, or $os/$arch/$variant.
func PlatformFromOptions ¶ added in v1.13.2
PlatformFromOptions parses the operating system (os) and architecture (arch) from the provided command line options. Deprecated in favor of PlatformsFromOptions(), but kept here because it's part of our API.
func PlatformsFromOptions ¶ added in v1.22.2
func PlatformsFromOptions(c *cobra.Command) (platforms []struct{ OS, Arch, Variant string }, err error)
PlatformsFromOptions parses the operating system (os) and architecture (arch) from the provided command line options. If --platform used, it also returns the list of platforms that were passed in as its argument.
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
ValidateVolumeCtrDir validates a volume mount's destination directory.
func ValidateVolumeHostDir ¶ added in v1.8.3
ValidateVolumeHostDir validates a volume mount's source directory
func ValidateVolumeOpts ¶ added in v1.8.3
ValidateVolumeOpts validates a volume's options
Types ¶
This section is empty.