mirror of https://github.com/docker/docs.git
add name, http_proxy, https_proxy and no_proxy to docker info
Signed-off-by: Victor Vieux <vieux@docker.com> Signed-off-by: Victor Vieux <victorvieux@gmail.com>
This commit is contained in:
parent
78676e5dac
commit
e10b4555e7
|
@ -7,6 +7,7 @@ import (
|
|||
"fmt"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"os"
|
||||
"runtime"
|
||||
"sort"
|
||||
"strconv"
|
||||
|
@ -37,6 +38,13 @@ func getInfo(c *context, w http.ResponseWriter, r *http.Request) {
|
|||
BridgeNfIp6tables: true,
|
||||
NCPU: c.cluster.TotalCpus(),
|
||||
MemTotal: c.cluster.TotalMemory(),
|
||||
HttpProxy: os.Getenv("http_proxy"),
|
||||
HttpsProxy: os.Getenv("https_proxy"),
|
||||
NoProxy: os.Getenv("no_proxy"),
|
||||
}
|
||||
|
||||
if hostname, err := os.Hostname(); err == nil {
|
||||
info.Name = hostname
|
||||
}
|
||||
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
|
|
Loading…
Reference in New Issue