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 /cmd/podman/push.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 'cmd/podman/push.go')
-rw-r--r-- | cmd/podman/push.go | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/cmd/podman/push.go b/cmd/podman/push.go index 331f92cd2..82589f3f1 100644 --- a/cmd/podman/push.go +++ b/cmd/podman/push.go @@ -81,7 +81,6 @@ func pushCmd(c *cli.Context) error { var ( registryCreds *types.DockerAuthConfig destName string - forceSecure bool ) args := c.Args() @@ -108,7 +107,6 @@ func pushCmd(c *cli.Context) error { } certPath := c.String("cert-dir") - skipVerify := !c.BoolT("tls-verify") removeSignatures := c.Bool("remove-signatures") signBy := c.String("sign-by") @@ -145,14 +143,12 @@ func pushCmd(c *cli.Context) error { } } - if c.IsSet("tls-verify") { - forceSecure = c.Bool("tls-verify") - } - dockerRegistryOptions := image.DockerRegistryOptions{ - DockerRegistryCreds: registryCreds, - DockerCertPath: certPath, - DockerInsecureSkipTLSVerify: skipVerify, + DockerRegistryCreds: registryCreds, + DockerCertPath: certPath, + } + if c.IsSet("tls-verify") { + dockerRegistryOptions.DockerInsecureSkipTLSVerify = types.NewOptionalBool(!c.BoolT("tls-verify")) } so := image.SigningOptions{ @@ -167,5 +163,5 @@ func pushCmd(c *cli.Context) error { authfile := getAuthFile(c.String("authfile")) - return newImage.PushImageToHeuristicDestination(getContext(), destName, manifestType, authfile, c.String("signature-policy"), writer, c.Bool("compress"), so, &dockerRegistryOptions, forceSecure, nil) + return newImage.PushImageToHeuristicDestination(getContext(), destName, manifestType, authfile, c.String("signature-policy"), writer, c.Bool("compress"), so, &dockerRegistryOptions, nil) } |