Merge pull request #15796 from azurezk/add-size-to-inspect
add container size info to inspect Upstream-commit: ce607916e9b4e294e66188bbaf50acaa86e3909f Component: engine
This commit is contained in:
@ -8,6 +8,7 @@ docker-inspect - Return low-level information on a container or image
|
||||
**docker inspect**
|
||||
[**--help**]
|
||||
[**-f**|**--format**[=*FORMAT*]]
|
||||
[**-s**|**--size**[=*false*]]
|
||||
[**--type**=*container*|*image*]
|
||||
CONTAINER|IMAGE [CONTAINER|IMAGE...]
|
||||
|
||||
@ -25,6 +26,9 @@ each result.
|
||||
**-f**, **--format**=""
|
||||
Format the output using the given Go template.
|
||||
|
||||
**-s**, **--size**=false
|
||||
Display total file sizes if the type is container.
|
||||
|
||||
**--type**=*container*|*image*
|
||||
Return JSON for specified type, permissible values are "image" or "container"
|
||||
|
||||
@ -205,6 +209,18 @@ output:
|
||||
You can get more information about how to write a Go template from:
|
||||
https://golang.org/pkg/text/template/.
|
||||
|
||||
## Getting size information on an container
|
||||
|
||||
$ docker inspect -s d2cc496561d6
|
||||
[
|
||||
{
|
||||
....
|
||||
"SizeRw": 0,
|
||||
"SizeRootFs": 972,
|
||||
....
|
||||
}
|
||||
]
|
||||
|
||||
## Getting information on an image
|
||||
|
||||
Use an image's ID or name (e.g., repository/name[:tag]) to get information
|
||||
|
||||
Reference in New Issue
Block a user