summaryrefslogtreecommitdiff
path: root/pkg/api
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-01-29 12:05:20 -0500
committerGitHub <noreply@github.com>2021-01-29 12:05:20 -0500
commit4ee66c2c2ecc747ec3d567c0cff6fb89b2f8f112 (patch)
treeb8d8227eea8be154ac72bb7bb655efc07a742278 /pkg/api
parentb59848a2b92b1554c55f6bd33a105c0fef158b8a (diff)
parentd7c356552e3c3d1710f22da2f710f9ad529c2ad9 (diff)
downloadpodman-4ee66c2c2ecc747ec3d567c0cff6fb89b2f8f112.tar.gz
podman-4ee66c2c2ecc747ec3d567c0cff6fb89b2f8f112.tar.bz2
podman-4ee66c2c2ecc747ec3d567c0cff6fb89b2f8f112.zip
Merge pull request #9149 from rhatdan/docs
Podman-remote push can support --format
Diffstat (limited to 'pkg/api')
-rw-r--r--pkg/api/handlers/compat/images_push.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/pkg/api/handlers/compat/images_push.go b/pkg/api/handlers/compat/images_push.go
index 4a8fcdff3..c352ac6cd 100644
--- a/pkg/api/handlers/compat/images_push.go
+++ b/pkg/api/handlers/compat/images_push.go
@@ -5,6 +5,7 @@ import (
"net/http"
"strings"
+ "github.com/containers/image/v5/types"
"github.com/containers/podman/v2/libpod"
"github.com/containers/podman/v2/pkg/api/handlers/utils"
"github.com/containers/podman/v2/pkg/auth"
@@ -27,8 +28,9 @@ func PushImage(w http.ResponseWriter, r *http.Request) {
All bool `schema:"all"`
Compress bool `schema:"compress"`
Destination string `schema:"destination"`
- Tag string `schema:"tag"`
+ Format string `schema:"format"`
TLSVerify bool `schema:"tlsVerify"`
+ Tag string `schema:"tag"`
}{
// This is where you can override the golang default value for one of fields
TLSVerify: true,
@@ -67,8 +69,12 @@ func PushImage(w http.ResponseWriter, r *http.Request) {
All: query.All,
Authfile: authfile,
Compress: query.Compress,
- Username: username,
+ Format: query.Format,
Password: password,
+ Username: username,
+ }
+ if _, found := r.URL.Query()["tlsVerify"]; found {
+ options.SkipTLSVerify = types.NewOptionalBool(!query.TLSVerify)
}
if err := imageEngine.Push(context.Background(), imageName, query.Destination, options); err != nil {
if errors.Cause(err) != storage.ErrImageUnknown {