Skip to content

Commit

Permalink
Support proxy environment for docker client
Browse files Browse the repository at this point in the history
Signed-off-by: PENG MIN <pm@jubeat.net>
  • Loading branch information
PMExtra committed Aug 27, 2024
1 parent d4fdb5b commit 4844680
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docker/daemon/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ func tlsConfig(sys *types.SystemContext) (*http.Client, error) {

return &http.Client{
Transport: &http.Transport{
Proxy: http.ProxyFromEnvironment,
TLSClientConfig: tlsc,
},
CheckRedirect: dockerclient.CheckRedirect,
Expand All @@ -89,6 +90,7 @@ func tlsConfig(sys *types.SystemContext) (*http.Client, error) {
func httpConfig() *http.Client {
return &http.Client{
Transport: &http.Transport{
Proxy: http.ProxyFromEnvironment,
TLSClientConfig: nil,
},
CheckRedirect: dockerclient.CheckRedirect,
Expand Down

0 comments on commit 4844680

Please sign in to comment.