mirror of
https://github.com/containers/podman.git
synced 2025-12-14 11:00:10 +08:00
Vendor in latest containers/(common,image,storage)
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
13
vendor/github.com/containers/common/pkg/config/config.go
generated
vendored
13
vendor/github.com/containers/common/pkg/config/config.go
generated
vendored
@@ -358,6 +358,9 @@ type EngineConfig struct {
|
||||
// OCIRuntimes are the set of configured OCI runtimes (default is runc).
|
||||
OCIRuntimes map[string][]string `toml:"runtimes,omitempty"`
|
||||
|
||||
// PlatformToOCIRuntime requests specific OCI runtime for a specified platform of image.
|
||||
PlatformToOCIRuntime map[string]string `toml:"platform_to_oci_runtime,omitempty"`
|
||||
|
||||
// PodExitPolicy determines the behaviour when the last container of a pod exits.
|
||||
PodExitPolicy PodExitPolicy `toml:"pod_exit_policy,omitempty"`
|
||||
|
||||
@@ -619,6 +622,16 @@ type Destination struct {
|
||||
IsMachine bool `toml:"is_machine,omitempty"`
|
||||
}
|
||||
|
||||
// Consumes container image's os and arch and returns if any dedicated runtime was
|
||||
// configured otherwise returns default runtime.
|
||||
func (c *EngineConfig) ImagePlatformToRuntime(os string, arch string) string {
|
||||
platformString := os + "/" + arch
|
||||
if val, ok := c.PlatformToOCIRuntime[platformString]; ok {
|
||||
return val
|
||||
}
|
||||
return c.OCIRuntime
|
||||
}
|
||||
|
||||
// NewConfig creates a new Config. It starts with an empty config and, if
|
||||
// specified, merges the config at `userConfigPath` path. Depending if we're
|
||||
// running as root or rootless, we then merge the system configuration followed
|
||||
|
||||
Reference in New Issue
Block a user