mirror of
https://github.com/docker/docs.git
synced 2026-04-12 14:25:46 +07:00
add docker server version to /info
Signed-off-by: Zhang Kun <zkazure@gmail.com>
This commit is contained in:
@@ -35,6 +35,7 @@ func (cli *DockerCli) CmdInfo(args ...string) error {
|
||||
|
||||
fmt.Fprintf(cli.out, "Containers: %d\n", info.Containers)
|
||||
fmt.Fprintf(cli.out, "Images: %d\n", info.Images)
|
||||
fmt.Fprintf(cli.out, "Engine Version: %s\n", info.ServerVersion)
|
||||
ioutils.FprintfIfNotEmpty(cli.out, "Storage Driver: %s\n", info.Driver)
|
||||
if info.DriverStatus != nil {
|
||||
for _, pair := range info.DriverStatus {
|
||||
|
||||
@@ -215,6 +215,7 @@ type Info struct {
|
||||
Name string
|
||||
Labels []string
|
||||
ExperimentalBuild bool
|
||||
ServerVersion string
|
||||
}
|
||||
|
||||
// ExecStartCheck is a temp struct used by execStart
|
||||
|
||||
@@ -90,6 +90,7 @@ func (daemon *Daemon) SystemInfo() (*types.Info, error) {
|
||||
DockerRootDir: daemon.config().Root,
|
||||
Labels: daemon.config().Labels,
|
||||
ExperimentalBuild: utils.ExperimentalBuild(),
|
||||
ServerVersion: dockerversion.VERSION,
|
||||
}
|
||||
|
||||
// TODO Windows. Refactor this more once sysinfo is refactored into
|
||||
|
||||
@@ -88,6 +88,7 @@ This section lists each version from latest to oldest. Each listing includes a
|
||||
list of DNS options to be used in the container.
|
||||
* `POST /build` now optionally takes a serialized map of build-time variables.
|
||||
* `GET /events` now includes a `timenano` field, in addition to the existing `time` field.
|
||||
* `GET /info` now lists engine version information.
|
||||
|
||||
### v1.20 API changes
|
||||
|
||||
|
||||
@@ -1860,6 +1860,7 @@ Display system-wide information
|
||||
},
|
||||
"SwapLimit": false,
|
||||
"SystemTime": "2015-03-10T11:11:23.730591467-07:00"
|
||||
"ServerVersion": "1.9.0"
|
||||
}
|
||||
|
||||
Status Codes:
|
||||
|
||||
@@ -21,6 +21,7 @@ For example:
|
||||
$ docker -D info
|
||||
Containers: 14
|
||||
Images: 52
|
||||
Engine Version: 1.9.0
|
||||
Storage Driver: aufs
|
||||
Root Dir: /var/lib/docker/aufs
|
||||
Backing Filesystem: extfs
|
||||
|
||||
@@ -25,7 +25,8 @@ func (s *DockerSuite) TestInfoApi(c *check.C) {
|
||||
"NCPU",
|
||||
"MemTotal",
|
||||
"KernelVersion",
|
||||
"Driver"}
|
||||
"Driver",
|
||||
"ServerVersion"}
|
||||
|
||||
out := string(body)
|
||||
for _, linePrefix := range stringsToCheck {
|
||||
|
||||
@@ -33,6 +33,7 @@ Here is a sample output:
|
||||
# docker info
|
||||
Containers: 14
|
||||
Images: 52
|
||||
Engine Version: 1.9.0
|
||||
Storage Driver: aufs
|
||||
Root Dir: /var/lib/docker/aufs
|
||||
Dirs: 80
|
||||
|
||||
Reference in New Issue
Block a user