diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2018-12-06 15:28:28 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-06 15:28:28 -0800 |
commit | a387c723a90a787a1d35c4a9b3b54347d5c08436 (patch) | |
tree | 7b4ce94ae629d4800c2fc694aafa530003101375 /libpod/common/common.go | |
parent | 71497706e124eaae0f4654278749c1e34a6c209f (diff) | |
parent | 489164fcfa3d897ab9f341249a7873bfd3c7d99e (diff) | |
download | podman-a387c723a90a787a1d35c4a9b3b54347d5c08436.tar.gz podman-a387c723a90a787a1d35c4a9b3b54347d5c08436.tar.bz2 podman-a387c723a90a787a1d35c4a9b3b54347d5c08436.zip |
Merge pull request #1930 from mtrmac/sysregistriesv2
Update c/image for sysregistriesv2 changes and automatic docker:// insecure configuration
Diffstat (limited to 'libpod/common/common.go')
-rw-r--r-- | libpod/common/common.go | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/libpod/common/common.go b/libpod/common/common.go index 932f1f6da..5d10bee36 100644 --- a/libpod/common/common.go +++ b/libpod/common/common.go @@ -1,32 +1,9 @@ package common import ( - "io" - - cp "github.com/containers/image/copy" "github.com/containers/image/types" ) -// GetCopyOptions constructs a new containers/image/copy.Options{} struct from the given parameters -func GetCopyOptions(reportWriter io.Writer, signaturePolicyPath string, srcDockerRegistry, destDockerRegistry *DockerRegistryOptions, signing SigningOptions, authFile, manifestType string, forceCompress bool) *cp.Options { - if srcDockerRegistry == nil { - srcDockerRegistry = &DockerRegistryOptions{} - } - if destDockerRegistry == nil { - destDockerRegistry = &DockerRegistryOptions{} - } - srcContext := srcDockerRegistry.GetSystemContext(signaturePolicyPath, authFile, forceCompress) - destContext := destDockerRegistry.GetSystemContext(signaturePolicyPath, authFile, forceCompress) - return &cp.Options{ - RemoveSignatures: signing.RemoveSignatures, - SignBy: signing.SignBy, - ReportWriter: reportWriter, - SourceCtx: srcContext, - DestinationCtx: destContext, - ForceManifestMIMEType: manifestType, - } -} - // GetSystemContext Constructs a new containers/image/types.SystemContext{} struct from the given signaturePolicy path func GetSystemContext(signaturePolicyPath, authFilePath string, forceCompress bool) *types.SystemContext { sc := &types.SystemContext{} |