diff --git a/api_params.go b/api_params.go index e4508542eff59e2b4f8f4459275ecaa64759060e..f6c5b2f4b8dc305cd3a0540550d62a4b812dcf9f 100644 --- a/api_params.go +++ b/api_params.go @@ -52,6 +52,7 @@ type APIInfo struct { Debug bool Containers int Images int + Driver string `json:",omitempty"` NFd int `json:",omitempty"` NGoroutines int `json:",omitempty"` MemoryLimit bool `json:",omitempty"` diff --git a/commands.go b/commands.go index 4b51bc44333cfd48ea11f7b96de090235df146c2..6fdc0cfbcdde231d0a072efcfff8b332bd259f21 100644 --- a/commands.go +++ b/commands.go @@ -460,6 +460,7 @@ func (cli *DockerCli) CmdInfo(args ...string) error { fmt.Fprintf(cli.out, "Containers: %d\n", out.Containers) fmt.Fprintf(cli.out, "Images: %d\n", out.Images) + fmt.Fprintf(cli.out, "Driver: %s\n", out.Driver) if out.Debug || os.Getenv("DEBUG") != "" { fmt.Fprintf(cli.out, "Debug mode (server): %v\n", out.Debug) fmt.Fprintf(cli.out, "Debug mode (client): %v\n", os.Getenv("DEBUG") != "") diff --git a/graphdriver/driver.go b/graphdriver/driver.go index f521e0bbafcd74b4549ac20ed5963fc773c2ff4c..aba3666b584144f304c536bd3395b11bf5aeecf9 100644 --- a/graphdriver/driver.go +++ b/graphdriver/driver.go @@ -11,6 +11,8 @@ import ( type InitFunc func(root string) (Driver, error) type Driver interface { + String() string + Create(id, parent string) error Remove(id string) error diff --git a/server.go b/server.go index 1d24f73433c3feb3b8d5925ac58d9fe682beb9c1..1f0c31d8426952ad467189309b9e5a2e8a3ce9e4 100644 --- a/server.go +++ b/server.go @@ -375,6 +375,7 @@ func (srv *Server) DockerInfo() *APIInfo { return &APIInfo{ Containers: len(srv.runtime.List()), Images: imgcount, + Driver: srv.runtime.driver.String(), MemoryLimit: srv.runtime.capabilities.MemoryLimit, SwapLimit: srv.runtime.capabilities.SwapLimit, IPv4Forwarding: !srv.runtime.capabilities.IPv4ForwardingDisabled,