mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
daemon/info.go: assign proxy fields directly
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
This commit is contained in:
parent
2bb1c530d7
commit
1df0bb5a13
1 changed files with 3 additions and 9 deletions
|
@ -86,6 +86,9 @@ func (daemon *Daemon) SystemInfo() (*types.Info, error) {
|
|||
ServerVersion: dockerversion.Version,
|
||||
ClusterStore: daemon.config().ClusterStore,
|
||||
ClusterAdvertise: daemon.config().ClusterAdvertise,
|
||||
HTTPProxy: os.Getenv("http_proxy"),
|
||||
HTTPSProxy: os.Getenv("https_proxy"),
|
||||
NoProxy: os.Getenv("no_proxy"),
|
||||
}
|
||||
|
||||
// TODO Windows. Refactor this more once sysinfo is refactored into
|
||||
|
@ -100,15 +103,6 @@ func (daemon *Daemon) SystemInfo() (*types.Info, error) {
|
|||
v.CPUCfsQuota = sysInfo.CPUCfsQuota
|
||||
}
|
||||
|
||||
if httpProxy := os.Getenv("http_proxy"); httpProxy != "" {
|
||||
v.HTTPProxy = httpProxy
|
||||
}
|
||||
if httpsProxy := os.Getenv("https_proxy"); httpsProxy != "" {
|
||||
v.HTTPSProxy = httpsProxy
|
||||
}
|
||||
if noProxy := os.Getenv("no_proxy"); noProxy != "" {
|
||||
v.NoProxy = noProxy
|
||||
}
|
||||
if hostname, err := os.Hostname(); err == nil {
|
||||
v.Name = hostname
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue