Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion add.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,10 @@ func getURL(src string, chown *idtools.IDPair, mountpoint, renameTarget string,
}
tlsClientConfig.InsecureSkipVerify = insecureSkipTLSVerify == types.OptionalBoolTrue

tr := &http.Transport{TLSClientConfig: tlsClientConfig}
tr := &http.Transport{
TLSClientConfig: tlsClientConfig,
Proxy: http.ProxyFromEnvironment,
}
httpClient := &http.Client{Transport: tr}
response, err := httpClient.Get(src)
if err != nil {
Expand Down
9 changes: 9 additions & 0 deletions tests/bud.bats
Original file line number Diff line number Diff line change
Expand Up @@ -7272,6 +7272,15 @@ _EOF
fi
}

@test "build proxy - ADD URL" {
_prefetch alpine
target=alpine-image
http_proxy=http://127.0.0.1:47 HTTPS_PROXY=http://127.0.0.1:47 \
run_buildah 125 build $WITH_POLICY_JSON -t alpine-image -f $BUDFILES/add-checksum/Containerfile $BUDFILES/add-checksum
expect_output --substring "127.0.0.1:47" "connection to fake proxy must fail"
expect_output --substring "connection refused" "connection to fake proxy must fail"
}

@test "bud-with-mount-bind-from-like-buildkit" {
skip_if_no_runtime
skip_if_in_container
Expand Down