1
0
mirror of https://github.com/moby/moby.git synced 2025-12-13 22:02:25 +03:00

add ID and Hostname in docker info

Signed-off-by: Victor Vieux <vieux@docker.com>
This commit is contained in:
Victor Vieux
2014-11-17 19:23:41 +00:00
parent 34cb92e2d4
commit 9a85f60c75
6 changed files with 46 additions and 0 deletions

View File

@@ -505,6 +505,12 @@ func (cli *DockerCli) CmdInfo(args ...string) error {
if remoteInfo.Exists("MemTotal") {
fmt.Fprintf(cli.out, "Total Memory: %s\n", units.BytesSize(float64(remoteInfo.GetInt64("MemTotal"))))
}
if remoteInfo.Exists("Hostname") {
fmt.Fprintf(cli.out, "Hostname: %s\n", remoteInfo.Get("Hostname"))
}
if remoteInfo.Exists("ID") {
fmt.Fprintf(cli.out, "ID: %s\n", remoteInfo.Get("ID"))
}
if remoteInfo.GetBool("Debug") || os.Getenv("DEBUG") != "" {
if remoteInfo.Exists("Debug") {