©
Ce document utilise Manuel du site Web PHP chinois Libérer
显示Docker版本信息
docker version [OPTIONS]
名字,简写 | 默认 | 描述 |
---|---|---|
--format, -f | 使用给定的Go模板格式化输出 |
命令 | 描述 |
---|---|
docker | Docker CLI的基本命令。 |
默认情况下,这将以易于阅读的布局呈现所有版本信息。如果指定了格式,则将执行给定的模板。
Go的文本/模板包描述格式的所有细节。
$ docker version Client:Version: 1.8.0API version: 1.20Go version: go1.4.2Git commit: f5bae0a Built: Tue Jun 23 17:56:00 UTC 2015OS/Arch: linux/amd64 Server:Version: 1.8.0API version: 1.20Go version: go1.4.2Git commit: f5bae0a Built: Tue Jun 23 17:56:00 UTC 2015OS/Arch: linux/amd64
$ docker version --format '{{.Server.Version}}'1.8.0
$ docker version --format '{{json .}}'{"Client":{"Version":"1.8.0","ApiVersion":"1.20","GitCommit":"f5bae0a","GoVersion":"go1.4.2","Os":"linux","Arch":"amd64","BuildTime":"Tue Jun 23 17:56:00 UTC 2015"},"ServerOK":true,"Server":{"Version":"1.8.0","ApiVersion":"1.20","GitCommit":"f5bae0a","GoVersion":"go1.4.2","Os":"linux","Arch":"amd64","KernelVersion":"3.13.2-gentoo","BuildTime":"Tue Jun 23 17:56:00 UTC 2015"}}