summaryrefslogtreecommitdiff
path: root/libpod/image/docker_registry_options.go
diff options
context:
space:
mode:
Diffstat (limited to 'libpod/image/docker_registry_options.go')
-rw-r--r--libpod/image/docker_registry_options.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/libpod/image/docker_registry_options.go b/libpod/image/docker_registry_options.go
index 75417fe8b..62a4af465 100644
--- a/libpod/image/docker_registry_options.go
+++ b/libpod/image/docker_registry_options.go
@@ -26,6 +26,10 @@ type DockerRegistryOptions struct {
// certificates and allows connecting to registries without encryption
// - or forces it on even if registries.conf has the registry configured as insecure.
DockerInsecureSkipTLSVerify types.OptionalBool
+ // If not "", overrides the use of platform.GOOS when choosing an image or verifying OS match.
+ OSChoice string
+ // If not "", overrides the use of platform.GOARCH when choosing an image or verifying architecture match.
+ ArchitectureChoice string
}
// GetSystemContext constructs a new system context from a parent context. the values in the DockerRegistryOptions, and other parameters.
@@ -35,12 +39,16 @@ func (o DockerRegistryOptions) GetSystemContext(parent *types.SystemContext, add
DockerCertPath: o.DockerCertPath,
DockerInsecureSkipTLSVerify: o.DockerInsecureSkipTLSVerify,
DockerArchiveAdditionalTags: additionalDockerArchiveTags,
+ OSChoice: o.OSChoice,
+ ArchitectureChoice: o.ArchitectureChoice,
}
if parent != nil {
sc.SignaturePolicyPath = parent.SignaturePolicyPath
sc.AuthFilePath = parent.AuthFilePath
sc.DirForceCompress = parent.DirForceCompress
sc.DockerRegistryUserAgent = parent.DockerRegistryUserAgent
+ sc.OSChoice = parent.OSChoice
+ sc.ArchitectureChoice = parent.ArchitectureChoice
}
return sc
}