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:
Vincent Demeester
2015-10-13 23:16:10 +02:00
13 changed files with 108 additions and 8 deletions

View File

@ -109,6 +109,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

View File

@ -467,6 +467,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