File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ package docker
22
33import (
44 "fmt"
5+ "os"
56 "os/exec"
67 "strings"
78)
@@ -23,6 +24,15 @@ func cmdSetupBuildx(builder Builder, driverOpts []string) *exec.Cmd {
2324 for _ , opt := range driverOpts {
2425 args = append (args , "--driver-opt" , opt )
2526 }
27+ if harnessHttpProxy := os .Getenv ("HARNESS_HTTP_PROXY" ); harnessHttpProxy != "" {
28+ args = append (args , "--driver-opt" , fmt .Sprintf ("env.http_proxy=%s" , harnessHttpProxy ))
29+
30+ if harnessHttpsProxy := os .Getenv ("HARNESS_HTTPS_PROXY" ); harnessHttpsProxy != "" {
31+ args = append (args , "--driver-opt" , fmt .Sprintf ("env.https_proxy=%s" , harnessHttpsProxy ))
32+ }
33+
34+ args = append (args , "--driver-opt" , "network=host" )
35+ }
2636 if builder .RemoteConn != "" && builder .Driver == remoteDriver {
2737 args = append (args , builder .RemoteConn )
2838 }
You can’t perform that action at this time.
0 commit comments