summaryrefslogtreecommitdiff
path: root/libpod/image/docker_registry_options.go
diff options
context:
space:
mode:
authorumohnani8 <umohnani@redhat.com>2018-05-21 13:53:19 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2018-05-25 15:15:47 +0000
commitc8b72e57a75262c0edeea839e9e34bb0c3e03d13 (patch)
tree3a2bb7210d309e358bfe84a0ab0f60e57b9f2e2f /libpod/image/docker_registry_options.go
parent0a4ade1c175d3188ad55d22d751a86c96e060a44 (diff)
downloadpodman-c8b72e57a75262c0edeea839e9e34bb0c3e03d13.tar.gz
podman-c8b72e57a75262c0edeea839e9e34bb0c3e03d13.tar.bz2
podman-c8b72e57a75262c0edeea839e9e34bb0c3e03d13.zip
save and load should support multi-tag for docker-archive
The docker-archive tar files can have multiple tags for the same image stored in it. Load pulls all the tags found in the archive when loading a tar file. Save can oush multiple tags of the same image to a tar archive. Signed-off-by: umohnani8 <umohnani@redhat.com> Closes: #819 Approved by: rhatdan
Diffstat (limited to 'libpod/image/docker_registry_options.go')
-rw-r--r--libpod/image/docker_registry_options.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/libpod/image/docker_registry_options.go b/libpod/image/docker_registry_options.go
index bbb49df28..838edf2d0 100644
--- a/libpod/image/docker_registry_options.go
+++ b/libpod/image/docker_registry_options.go
@@ -1,6 +1,9 @@
package image
-import "github.com/containers/image/types"
+import (
+ "github.com/containers/image/docker/reference"
+ "github.com/containers/image/types"
+)
// DockerRegistryOptions encapsulates settings that affect how we connect or
// authenticate to a remote registry.
@@ -22,7 +25,7 @@ type DockerRegistryOptions struct {
// GetSystemContext constructs a new system context from the given signaturePolicy path and the
// values in the DockerRegistryOptions
-func (o DockerRegistryOptions) GetSystemContext(signaturePolicyPath, authFile string, forceCompress bool) *types.SystemContext {
+func (o DockerRegistryOptions) GetSystemContext(signaturePolicyPath, authFile string, forceCompress bool, additionalDockerArchiveTags []reference.NamedTagged) *types.SystemContext {
sc := &types.SystemContext{
SignaturePolicyPath: signaturePolicyPath,
DockerAuthConfig: o.DockerRegistryCreds,
@@ -30,6 +33,7 @@ func (o DockerRegistryOptions) GetSystemContext(signaturePolicyPath, authFile st
DockerInsecureSkipTLSVerify: o.DockerInsecureSkipTLSVerify,
AuthFilePath: authFile,
DirForceCompress: forceCompress,
+ DockerArchiveAdditionalTags: additionalDockerArchiveTags,
}
return sc
}