diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2022-06-10 07:04:32 -0400 |
---|---|---|
committer | Daniel J Walsh <dwalsh@redhat.com> | 2022-06-10 07:14:12 -0400 |
commit | 48cf1d258326b25308225cb4a22703d6e3416b18 (patch) | |
tree | a030f23fc4424631ee49fabd18446a38a07d15a9 /pkg/api/handlers/libpod/images.go | |
parent | 9f1bd0a0a1494f46a49ca7f22511c5a78006afd8 (diff) | |
download | podman-48cf1d258326b25308225cb4a22703d6e3416b18.tar.gz podman-48cf1d258326b25308225cb4a22703d6e3416b18.tar.bz2 podman-48cf1d258326b25308225cb4a22703d6e3416b18.zip |
podman-remote push --remove-signatures support
I don't see a reason why we don't support --remove-signatures
from remote push, so adding support.
Fixes: https://github.com/containers/podman/issues/14558
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'pkg/api/handlers/libpod/images.go')
-rw-r--r-- | pkg/api/handlers/libpod/images.go | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/pkg/api/handlers/libpod/images.go b/pkg/api/handlers/libpod/images.go index efcbe9d77..60ed5feb3 100644 --- a/pkg/api/handlers/libpod/images.go +++ b/pkg/api/handlers/libpod/images.go @@ -422,10 +422,11 @@ func PushImage(w http.ResponseWriter, r *http.Request) { runtime := r.Context().Value(api.RuntimeKey).(*libpod.Runtime) query := struct { - Destination string `schema:"destination"` - TLSVerify bool `schema:"tlsVerify"` - Format string `schema:"format"` - All bool `schema:"all"` + All bool `schema:"all"` + Destination string `schema:"destination"` + Format string `schema:"format"` + RemoveSignatures bool `schema:"removeSignatures"` + TLSVerify bool `schema:"tlsVerify"` }{ // This is where you can override the golang default value for one of fields } @@ -462,12 +463,13 @@ func PushImage(w http.ResponseWriter, r *http.Request) { password = authconf.Password } options := entities.ImagePushOptions{ - Authfile: authfile, - Username: username, - Password: password, - Format: query.Format, - All: query.All, - Quiet: true, + All: query.All, + Authfile: authfile, + Format: query.Format, + Password: password, + Quiet: true, + RemoveSignatures: query.RemoveSignatures, + Username: username, } if _, found := r.URL.Query()["tlsVerify"]; found { options.SkipTLSVerify = types.NewOptionalBool(!query.TLSVerify) |