mirror of
https://github.com/docker/cli.git
synced 2026-11-06 21:18:28 -04:00
add --format flag to docker info
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
This commit is contained in:
+13
-1
@@ -7,7 +7,7 @@ docker-info - Display system-wide information
|
||||
# SYNOPSIS
|
||||
**docker info**
|
||||
[**--help**]
|
||||
|
||||
[**-f**|**--format**[=*FORMAT*]]
|
||||
|
||||
# DESCRIPTION
|
||||
This command displays system wide information regarding the Docker installation.
|
||||
@@ -15,6 +15,10 @@ Information displayed includes the kernel version, number of containers and imag
|
||||
The number of images shown is the number of unique images. The same image tagged
|
||||
under different names is counted only once.
|
||||
|
||||
If a format is specified, the given template will be executed instead of the
|
||||
default format. Go's **text/template** package
|
||||
describes all the details of the format.
|
||||
|
||||
Depending on the storage driver in use, additional information can be shown, such
|
||||
as pool name, data file, metadata file, data space used, total data space, metadata
|
||||
space used, and total metadata space.
|
||||
@@ -28,6 +32,9 @@ available on the volume where `/var/lib/docker` is mounted.
|
||||
**--help**
|
||||
Print usage statement
|
||||
|
||||
**-f**, **--format**=""
|
||||
Format the output using the given go template
|
||||
|
||||
# EXAMPLES
|
||||
|
||||
## Display Docker system information
|
||||
@@ -140,6 +147,11 @@ information about the devicemapper storage driver is shown:
|
||||
myinsecurehost:5000
|
||||
127.0.0.0/8
|
||||
|
||||
You can also specify the output format:
|
||||
|
||||
$ docker info --format '{{json .}}'
|
||||
{"ID":"I54V:OLXT:HVMM:TPKO:JPHQ:CQCD:JNLC:O3BZ:4ZVJ:43XJ:PFHZ:6N2S","Containers":14, ...}
|
||||
|
||||
# HISTORY
|
||||
April 2014, Originally compiled by William Henry (whenry at redhat dot com)
|
||||
based on docker.com source material and internal work.
|
||||
|
||||
Reference in New Issue
Block a user