Wait container's removal via Events API

If AutoRemove is set, wait until client get `destroy` events, or get
`detach` events that implies container is detached but not stopped.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: 6dd8e10d6ed7a7371c5c1824ad58c4403a7b3bfd
Component: engine
This commit is contained in:
Zhang Wei
2016-06-09 23:32:20 +08:00
parent b27f1b6d73
commit 34a323258f
9 changed files with 114 additions and 19 deletions

View File

@ -116,6 +116,8 @@ This section lists each version from latest to oldest. Each listing includes a
[Docker Remote API v1.25](docker_remote_api_v1.25.md) documentation
* `POST /containers/create` now takes `AutoRemove` in HostConfig, auto-removal will be done on daemon side.
### v1.24 API changes
[Docker Remote API v1.24](docker_remote_api_v1.24.md) documentation

View File

@ -325,6 +325,7 @@ Create a container
"CapDrop": ["MKNOD"],
"GroupAdd": ["newgroup"],
"RestartPolicy": { "Name": "", "MaximumRetryCount": 0 },
"AutoRemove": true,
"NetworkMode": "bridge",
"Devices": [],
"Ulimits": [{}],
@ -599,6 +600,7 @@ Return low-level information on the container `id`
"MaximumRetryCount": 2,
"Name": "on-failure"
},
"AutoRemove": true,
"LogConfig": {
"Config": null,
"Type": "json-file"