Implemet docker update command
It's used for updating properties of one or more containers, we only support resource configs for now. It can be extended in the future. Signed-off-by: Qiang Huang <h.huangqiang@huawei.com> Upstream-commit: 8799c4fc0feadede6ae60e77bd7d9dfd7cc72a79 Component: engine
This commit is contained in:
@ -1003,6 +1003,50 @@ Status Codes:
|
||||
- **404** – no such container
|
||||
- **500** – server error
|
||||
|
||||
### Update a container
|
||||
|
||||
`POST /containers/(id)/update`
|
||||
|
||||
Update resource configs of one or more containers.
|
||||
|
||||
**Example request**:
|
||||
|
||||
POST /containers/(id)/update HTTP/1.1
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"HostConfig": {
|
||||
"Resources": {
|
||||
"BlkioWeight": 300,
|
||||
"CpuShares": 512,
|
||||
"CpuPeriod": 100000,
|
||||
"CpuQuota": 50000,
|
||||
"CpusetCpus": "0,1",
|
||||
"CpusetMems": "0",
|
||||
"Memory": 314572800,
|
||||
"MemorySwap": 514288000,
|
||||
"MemoryReservation": 209715200,
|
||||
"KernelMemory": 52428800,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 200 OK
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"Warnings": []
|
||||
}
|
||||
|
||||
Status Codes:
|
||||
|
||||
- **200** – no error
|
||||
- **400** – bad parameter
|
||||
- **404** – no such container
|
||||
- **500** – server error
|
||||
|
||||
### Rename a container
|
||||
|
||||
`POST /containers/(id)/rename`
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user