mirror of
https://github.com/containers/podman.git
synced 2025-11-02 23:39:52 +08:00
Pass --tls-verify option in podman -remote build
Fixes: https://github.com/containers/podman/issues/13979 [NO NEW TESTS NEEDED] Buildah has a test for this. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
@ -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
|
||||
|
||||
Reference in New Issue
Block a user