diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-10-27 15:24:23 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-27 15:24:23 +0000 |
commit | d908da51fbe0089074355850e7854e0c9502a35a (patch) | |
tree | 2f5cb93d514b0345043a44da9f0a681cbe532ae6 /cmd/podman/common/create.go | |
parent | 6caf5e3b7c08cb3c5b62ed069e458910321b43b2 (diff) | |
parent | ff31f2264da1550be97055865dea639eb0882327 (diff) | |
download | podman-d908da51fbe0089074355850e7854e0c9502a35a.tar.gz podman-d908da51fbe0089074355850e7854e0c9502a35a.tar.bz2 podman-d908da51fbe0089074355850e7854e0c9502a35a.zip |
Merge pull request #12064 from vrothberg/fix-11933
container create: fix --tls-verify parsing
Diffstat (limited to 'cmd/podman/common/create.go')
-rw-r--r-- | cmd/podman/common/create.go | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/cmd/podman/common/create.go b/cmd/podman/common/create.go index 6270bad16..fbc8fb8ab 100644 --- a/cmd/podman/common/create.go +++ b/cmd/podman/common/create.go @@ -5,6 +5,7 @@ import ( "github.com/containers/common/pkg/auth" "github.com/containers/common/pkg/completion" + commonFlag "github.com/containers/common/pkg/flag" "github.com/containers/podman/v3/cmd/podman/registry" "github.com/containers/podman/v3/libpod/define" "github.com/containers/podman/v3/pkg/domain/entities" @@ -589,12 +590,9 @@ func DefineCreateFlags(cmd *cobra.Command, cf *entities.ContainerCreateOptions, ) _ = cmd.RegisterFlagCompletionFunc(timeoutFlagName, completion.AutocompleteNone) - // Flag for TLS verification, so that `run` and `create` commands can make use of it. - // Make sure to use `=` while using this flag i.e `--tls-verify=false/true` - tlsVerifyFlagName := "tls-verify" - createFlags.BoolVar( + commonFlag.OptionalBoolFlag(createFlags, &cf.TLSVerify, - tlsVerifyFlagName, true, + "tls-verify", "Require HTTPS and verify certificates when contacting registries for pulling images", ) |