mirror of https://github.com/docker/docs.git
Show active driver in docker info output
This commit is contained in:
parent
0c38f86e5e
commit
062810caed
|
@ -52,6 +52,7 @@ type APIInfo struct {
|
||||||
Debug bool
|
Debug bool
|
||||||
Containers int
|
Containers int
|
||||||
Images int
|
Images int
|
||||||
|
Driver string `json:",omitempty"`
|
||||||
NFd int `json:",omitempty"`
|
NFd int `json:",omitempty"`
|
||||||
NGoroutines int `json:",omitempty"`
|
NGoroutines int `json:",omitempty"`
|
||||||
MemoryLimit bool `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, "Containers: %d\n", out.Containers)
|
||||||
fmt.Fprintf(cli.out, "Images: %d\n", out.Images)
|
fmt.Fprintf(cli.out, "Images: %d\n", out.Images)
|
||||||
|
fmt.Fprintf(cli.out, "Driver: %s\n", out.Driver)
|
||||||
if out.Debug || os.Getenv("DEBUG") != "" {
|
if out.Debug || os.Getenv("DEBUG") != "" {
|
||||||
fmt.Fprintf(cli.out, "Debug mode (server): %v\n", out.Debug)
|
fmt.Fprintf(cli.out, "Debug mode (server): %v\n", out.Debug)
|
||||||
fmt.Fprintf(cli.out, "Debug mode (client): %v\n", os.Getenv("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 InitFunc func(root string) (Driver, error)
|
||||||
|
|
||||||
type Driver interface {
|
type Driver interface {
|
||||||
|
String() string
|
||||||
|
|
||||||
Create(id, parent string) error
|
Create(id, parent string) error
|
||||||
Remove(id string) error
|
Remove(id string) error
|
||||||
|
|
||||||
|
|
|
@ -375,6 +375,7 @@ func (srv *Server) DockerInfo() *APIInfo {
|
||||||
return &APIInfo{
|
return &APIInfo{
|
||||||
Containers: len(srv.runtime.List()),
|
Containers: len(srv.runtime.List()),
|
||||||
Images: imgcount,
|
Images: imgcount,
|
||||||
|
Driver: srv.runtime.driver.String(),
|
||||||
MemoryLimit: srv.runtime.capabilities.MemoryLimit,
|
MemoryLimit: srv.runtime.capabilities.MemoryLimit,
|
||||||
SwapLimit: srv.runtime.capabilities.SwapLimit,
|
SwapLimit: srv.runtime.capabilities.SwapLimit,
|
||||||
IPv4Forwarding: !srv.runtime.capabilities.IPv4ForwardingDisabled,
|
IPv4Forwarding: !srv.runtime.capabilities.IPv4ForwardingDisabled,
|
||||||
|
|
Loading…
Reference in New Issue