summaryrefslogtreecommitdiff
path: root/pkg/bindings/images/build.go
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/bindings/images/build.go
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/bindings/images/build.go')
-rw-r--r--pkg/bindings/images/build.go13
1 files changed, 9 insertions, 4 deletions
diff --git a/pkg/bindings/images/build.go b/pkg/bindings/images/build.go
index 15900a2ed..1729bd922 100644
--- a/pkg/bindings/images/build.go
+++ b/pkg/bindings/images/build.go
@@ -312,10 +312,15 @@ func Build(ctx context.Context, containerFiles []string, options entities.BuildO
var (
headers http.Header
)
- if options.SystemContext != nil && options.SystemContext.DockerAuthConfig != nil {
- headers, err = auth.MakeXRegistryAuthHeader(options.SystemContext, options.SystemContext.DockerAuthConfig.Username, options.SystemContext.DockerAuthConfig.Password)
- } else {
- headers, err = auth.MakeXRegistryConfigHeader(options.SystemContext, "", "")
+ if options.SystemContext != nil {
+ if options.SystemContext.DockerAuthConfig != nil {
+ headers, err = auth.MakeXRegistryAuthHeader(options.SystemContext, options.SystemContext.DockerAuthConfig.Username, options.SystemContext.DockerAuthConfig.Password)
+ } else {
+ headers, err = auth.MakeXRegistryConfigHeader(options.SystemContext, "", "")
+ }
+ if options.SystemContext.DockerInsecureSkipTLSVerify == types.OptionalBoolTrue {
+ params.Set("tlsVerify", "false")
+ }
}
if err != nil {
return nil, err