From 21629b0501c62a991eef536765b7320bc2d45763 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Thu, 18 Nov 2021 20:47:33 -0500 Subject: podman-remote does not support signature-policy Fixes: https://github.com/containers/podman/issues/12357 Signed-off-by: Daniel J Walsh --- cmd/podman/common/create.go | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'cmd/podman/common') 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 @@ -551,11 +551,6 @@ func DefineCreateFlags(cmd *cobra.Command, cf *entities.ContainerCreateOptions, _ = cmd.RegisterFlagCompletionFunc(shmSizeFlagName, completion.AutocompleteNone) stopSignalFlagName := "stop-signal" - createFlags.StringVar( - &cf.SignaturePolicy, - "signature-policy", "", - "`Pathname` of signature policy file (not usually used)", - ) createFlags.StringVar( &cf.StopSignal, stopSignalFlagName, "", @@ -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( -- cgit v1.2.3-54-g00ecf