summaryrefslogtreecommitdiff
path: root/libpod/image/docker_registry_options.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-10-29 20:58:51 +0100
committerGitHub <noreply@github.com>2019-10-29 20:58:51 +0100
commite7540d0406c49b22de245246d16ebc6e1778df37 (patch)
treed25a5f8d259d19f2c0017d9987e93d065e577f89 /libpod/image/docker_registry_options.go
parent5918f3a5f1d11862fbaaca94ff25f1d9cc1309e2 (diff)
parent66c126d6dee178f96f8a120f13372802d46ea9b5 (diff)
downloadpodman-e7540d0406c49b22de245246d16ebc6e1778df37.tar.gz
podman-e7540d0406c49b22de245246d16ebc6e1778df37.tar.bz2
podman-e7540d0406c49b22de245246d16ebc6e1778df37.zip
Merge pull request #4310 from nalind/manifest-lists
Move to containers/image v5, support manifest lists
Diffstat (limited to 'libpod/image/docker_registry_options.go')
-rw-r--r--libpod/image/docker_registry_options.go12
1 files changed, 10 insertions, 2 deletions
diff --git a/libpod/image/docker_registry_options.go b/libpod/image/docker_registry_options.go
index d205fe4ac..62a4af465 100644
--- a/libpod/image/docker_registry_options.go
+++ b/libpod/image/docker_registry_options.go
@@ -3,8 +3,8 @@ package image
import (
"fmt"
- "github.com/containers/image/v4/docker/reference"
- "github.com/containers/image/v4/types"
+ "github.com/containers/image/v5/docker/reference"
+ "github.com/containers/image/v5/types"
podmanVersion "github.com/containers/libpod/version"
)
@@ -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
}