diff options
author | 😎Mostafa Emami <mustafaemami@gmail.com> | 2022-09-20 07:27:00 +0200 |
---|---|---|
committer | 😎Mostafa Emami <mustafaemami@gmail.com> | 2022-09-21 20:30:23 +0200 |
commit | 33c31112fb44da455b8841b73a92980a07f42720 (patch) | |
tree | 53e1d0b0ba0d7ae2dfef78882df215beed65383b /cmd/podman | |
parent | 30231d0da7e6dcf3d6d1f45b10150baae35aaf28 (diff) | |
download | podman-33c31112fb44da455b8841b73a92980a07f42720.tar.gz podman-33c31112fb44da455b8841b73a92980a07f42720.tar.bz2 podman-33c31112fb44da455b8841b73a92980a07f42720.zip |
cli: Add signature-policy flag to podman save
Allow overwrite of the signature-policy file
by passing signature-policy flag to podman save command
Closes: https://github.com/containers/podman/issues/15869
Signed-off-by: 😎Mostafa Emami <mustafaemami@gmail.com>
Diffstat (limited to 'cmd/podman')
-rw-r--r-- | cmd/podman/images/save.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cmd/podman/images/save.go b/cmd/podman/images/save.go index ecff0f841..426684d49 100644 --- a/cmd/podman/images/save.go +++ b/cmd/podman/images/save.go @@ -96,6 +96,11 @@ func saveFlags(cmd *cobra.Command) { flags.BoolVarP(&saveOpts.Quiet, "quiet", "q", false, "Suppress the output") flags.BoolVarP(&saveOpts.MultiImageArchive, "multi-image-archive", "m", containerConfig.Engine.MultiImageArchive, "Interpret additional arguments as images not tags and create a multi-image-archive (only for docker-archive)") + + if !registry.IsRemote() { + flags.StringVar(&saveOpts.SignaturePolicy, "signature-policy", "", "Path to a signature-policy file") + _ = flags.MarkHidden("signature-policy") + } } func save(cmd *cobra.Command, args []string) (finalErr error) { |