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:
Victor Vieux 2015-07-03 02:44:04 -07:00 committed by Victor Vieux
parent 78676e5dac
commit e10b4555e7
1 changed files with 8 additions and 0 deletions

View File

@ -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")