From 48446805cdce9dc49d6cb461ba9e4b19807e98a2 Mon Sep 17 00:00:00 2001 From: PENG MIN Date: Tue, 27 Aug 2024 21:53:33 +0800 Subject: [PATCH] Support proxy environment for docker client Signed-off-by: PENG MIN --- docker/daemon/client.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docker/daemon/client.go b/docker/daemon/client.go index 354af2140..64ccf6ae5 100644 --- a/docker/daemon/client.go +++ b/docker/daemon/client.go @@ -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, @@ -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,