add size to inspect
Signed-off-by: Zhang Kun <zkazure@gmail.com> Upstream-commit: b4d6b23838bb7d8436a1966fc3ef3ade83544d58 Component: engine
This commit is contained in:
@ -92,6 +92,7 @@ list of DNS options to be used in the container.
|
||||
* `GET /info` now lists engine version information.
|
||||
* `GET /containers/json` will return `ImageID` of the image used by container.
|
||||
* `POST /exec/(name)/start` will now return an HTTP 409 when the container is either stopped or paused.
|
||||
* `GET /containers/(name)/json` now accepts a `size` parameter. Setting this parameter to '1' returns container size information in the `SizeRw` and `SizeRootFs` fields.
|
||||
|
||||
### v1.20 API changes
|
||||
|
||||
|
||||
@ -466,6 +466,26 @@ Return low-level information on the container `id`
|
||||
]
|
||||
}
|
||||
|
||||
**Example request, with size information**:
|
||||
|
||||
GET /containers/4fa6e0f0c678/json?size=1 HTTP/1.1
|
||||
|
||||
**Example response, with size information**:
|
||||
|
||||
HTTP/1.1 200 OK
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
....
|
||||
"SizeRw": 0,
|
||||
"SizeRootFs": 972,
|
||||
....
|
||||
}
|
||||
|
||||
Query Parameters:
|
||||
|
||||
- **size** – 1/True/true or 0/False/false, return container size information. Default is `false`.
|
||||
|
||||
Status Codes:
|
||||
|
||||
- **200** – no error
|
||||
|
||||
@ -18,6 +18,7 @@ parent = "smn_cli"
|
||||
--help=false Print usage
|
||||
--type=container|image Return JSON for specified type, permissible
|
||||
values are "image" or "container"
|
||||
-s, --size=false Display total file sizes if the type is container
|
||||
|
||||
By default, this will render all results in a JSON array. If a format is
|
||||
specified, the given template will be executed for each result.
|
||||
|
||||
Reference in New Issue
Block a user