Show active driver in docker info output
This commit is contained in:
parent
0c38f86e5e
commit
062810caed
4 changed files with 5 additions and 0 deletions
|
@ -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"`
|
||||
|
|
|
@ -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") != "")
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Reference in a new issue