summaryrefslogtreecommitdiff
path: root/pkg/api
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-04-25 15:24:17 -0400
committerGitHub <noreply@github.com>2022-04-25 15:24:17 -0400
commit181c9d3ee3ad4820b9ae91f1f02faf7b9e65fc87 (patch)
tree39167d7e876499ed721ae4d6670e05ae7fafe9fb /pkg/api
parent6984a0f35704204fa15374aa2c133c4e6e0b366f (diff)
parent3d1e4060819be8ae28f99da945ab4df23bf9638d (diff)
downloadpodman-181c9d3ee3ad4820b9ae91f1f02faf7b9e65fc87.tar.gz
podman-181c9d3ee3ad4820b9ae91f1f02faf7b9e65fc87.tar.bz2
podman-181c9d3ee3ad4820b9ae91f1f02faf7b9e65fc87.zip
Merge pull request #13990 from rhatdan/build
Pass --tls-verify option in podman -remote build
Diffstat (limited to 'pkg/api')
-rw-r--r--pkg/api/handlers/compat/images_build.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/pkg/api/handlers/compat/images_build.go b/pkg/api/handlers/compat/images_build.go
index 08646202a..1a24f1ae3 100644
--- a/pkg/api/handlers/compat/images_build.go
+++ b/pkg/api/handlers/compat/images_build.go
@@ -123,6 +123,7 @@ func BuildImage(w http.ResponseWriter, r *http.Request) {
Tags []string `schema:"t"`
Target string `schema:"target"`
Timestamp int64 `schema:"timestamp"`
+ TLSVerify bool `schema:"tlsVerify"`
Ulimits string `schema:"ulimits"`
UnsetEnvs []string `schema:"unsetenv"`
Secrets string `schema:"secrets"`
@@ -491,6 +492,11 @@ func BuildImage(w http.ResponseWriter, r *http.Request) {
}
utils.PossiblyEnforceDockerHub(r, systemContext)
+ if _, found := r.URL.Query()["tlsVerify"]; found {
+ systemContext.DockerInsecureSkipTLSVerify = types.NewOptionalBool(!query.TLSVerify)
+ systemContext.OCIInsecureSkipTLSVerify = !query.TLSVerify
+ systemContext.DockerDaemonInsecureSkipTLSVerify = !query.TLSVerify
+ }
// Channels all mux'ed in select{} below to follow API build protocol
stdout := channel.NewWriter(make(chan []byte))
defer stdout.Close()