diff options
Diffstat (limited to 'libpod/image/docker_registry_options.go')
-rw-r--r-- | libpod/image/docker_registry_options.go | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/libpod/image/docker_registry_options.go b/libpod/image/docker_registry_options.go index 838edf2d0..97a151396 100644 --- a/libpod/image/docker_registry_options.go +++ b/libpod/image/docker_registry_options.go @@ -23,18 +23,19 @@ type DockerRegistryOptions struct { DockerInsecureSkipTLSVerify bool } -// 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, additionalDockerArchiveTags []reference.NamedTagged) *types.SystemContext { +// GetSystemContext constructs a new system context from a parent context. the values in the DockerRegistryOptions, and other parameters. +func (o DockerRegistryOptions) GetSystemContext(parent *types.SystemContext, additionalDockerArchiveTags []reference.NamedTagged) *types.SystemContext { sc := &types.SystemContext{ - SignaturePolicyPath: signaturePolicyPath, DockerAuthConfig: o.DockerRegistryCreds, DockerCertPath: o.DockerCertPath, DockerInsecureSkipTLSVerify: o.DockerInsecureSkipTLSVerify, - AuthFilePath: authFile, - DirForceCompress: forceCompress, DockerArchiveAdditionalTags: additionalDockerArchiveTags, } + if parent != nil { + sc.SignaturePolicyPath = parent.SignaturePolicyPath + sc.AuthFilePath = parent.AuthFilePath + sc.DirForceCompress = parent.DirForceCompress + } return sc } |