diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2021-11-18 20:47:33 -0500 |
---|---|---|
committer | Daniel J Walsh <dwalsh@redhat.com> | 2021-11-19 13:55:10 -0500 |
commit | 21629b0501c62a991eef536765b7320bc2d45763 (patch) | |
tree | 38404b476151b3e601c9f9648ae47e6bda167a9f /cmd/podman/common/create.go | |
parent | 2755d0255c94ac2ef797636935f83e3351d4d5af (diff) | |
download | podman-21629b0501c62a991eef536765b7320bc2d45763.tar.gz podman-21629b0501c62a991eef536765b7320bc2d45763.tar.bz2 podman-21629b0501c62a991eef536765b7320bc2d45763.zip |
podman-remote does not support signature-policy
Fixes: https://github.com/containers/podman/issues/12357
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'cmd/podman/common/create.go')
-rw-r--r-- | cmd/podman/common/create.go | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/cmd/podman/common/create.go b/cmd/podman/common/create.go index d73fa653f..dad79348d 100644 --- a/cmd/podman/common/create.go +++ b/cmd/podman/common/create.go @@ -552,11 +552,6 @@ func DefineCreateFlags(cmd *cobra.Command, cf *entities.ContainerCreateOptions, stopSignalFlagName := "stop-signal" createFlags.StringVar( - &cf.SignaturePolicy, - "signature-policy", "", - "`Pathname` of signature policy file (not usually used)", - ) - createFlags.StringVar( &cf.StopSignal, stopSignalFlagName, "", "Signal to stop a container. Default is SIGTERM", @@ -702,10 +697,16 @@ func DefineCreateFlags(cmd *cobra.Command, cf *entities.ContainerCreateOptions, "Write the container process ID to the file") _ = cmd.RegisterFlagCompletionFunc(pidFileFlagName, completion.AutocompleteDefault) - _ = createFlags.MarkHidden("signature-policy") if registry.IsRemote() { _ = createFlags.MarkHidden("env-host") _ = createFlags.MarkHidden("http-proxy") + } else { + createFlags.StringVar( + &cf.SignaturePolicy, + "signature-policy", "", + "`Pathname` of signature policy file (not usually used)", + ) + _ = createFlags.MarkHidden("signature-policy") } createFlags.BoolVar( |