mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #4836 from atlassian/master
Use environmental proxy when doing a ping to the remote repo
This commit is contained in:
commit
e13b4fd869
1 changed files with 4 additions and 1 deletions
|
@ -41,7 +41,10 @@ func pingRegistryEndpoint(endpoint string) (bool, error) {
|
||||||
conn.SetDeadline(time.Now().Add(time.Duration(10) * time.Second))
|
conn.SetDeadline(time.Now().Add(time.Duration(10) * time.Second))
|
||||||
return conn, nil
|
return conn, nil
|
||||||
}
|
}
|
||||||
httpTransport := &http.Transport{Dial: httpDial}
|
httpTransport := &http.Transport{
|
||||||
|
Dial: httpDial,
|
||||||
|
Proxy: http.ProxyFromEnvironment,
|
||||||
|
}
|
||||||
client := &http.Client{Transport: httpTransport}
|
client := &http.Client{Transport: httpTransport}
|
||||||
resp, err := client.Get(endpoint + "_ping")
|
resp, err := client.Get(endpoint + "_ping")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Add table
Reference in a new issue