Merge pull request #9489 from crosbymichael/info-root
Return docker's root dir in docker -D info Upstream-commit: 12252e39a0abc188e1cd1fe9e921eef967308e1c Component: engine
This commit is contained in:
@@ -544,6 +544,9 @@ func (cli *DockerCli) CmdInfo(args ...string) error {
|
||||
if initPath := remoteInfo.Get("InitPath"); initPath != "" {
|
||||
fmt.Fprintf(cli.out, "Init Path: %s\n", initPath)
|
||||
}
|
||||
if root := remoteInfo.Get("DockerRootDir"); root != "" {
|
||||
fmt.Fprintf(cli.out, "Docker Root Dir: %s\n", root)
|
||||
}
|
||||
}
|
||||
|
||||
if len(remoteInfo.GetList("IndexServerAddress")) != 0 {
|
||||
|
||||
@@ -76,6 +76,7 @@ func (daemon *Daemon) CmdInfo(job *engine.Job) engine.Status {
|
||||
v.Set("InitPath", initPath)
|
||||
v.SetInt("NCPU", runtime.NumCPU())
|
||||
v.SetInt64("MemTotal", meminfo.MemTotal)
|
||||
v.Set("DockerRootDir", daemon.Config().Root)
|
||||
if hostname, err := os.Hostname(); err == nil {
|
||||
v.Set("Name", hostname)
|
||||
}
|
||||
|
||||
@@ -1066,6 +1066,7 @@ For example:
|
||||
Goroutines: 9
|
||||
EventsListeners: 0
|
||||
Init Path: /usr/bin/docker
|
||||
Docker Root Dir: /var/lib/docker
|
||||
Username: svendowideit
|
||||
Registry: [https://index.docker.io/v1/]
|
||||
Labels:
|
||||
|
||||
Reference in New Issue
Block a user