v1
latestSwagger 2.02026-07-17107130444.8 KBContainer
Update a container
Change various configuration options of a container without having to recreate it.
post/containers/{id}/update
Path parameters
idstring required
ID or name of the container
Request body
Example request
{
"BlkioWeight": 300,
"CpuShares": 512,
"CpuPeriod": 100000,
"CpuQuota": 50000,
"CpuRealtimePeriod": 1000000,
"CpuRealtimeRuntime": 10000,
"CpusetCpus": "0,1",
"CpusetMems": "0",
"Memory": 314572800,
"MemorySwap": 514288000,
"MemoryReservation": 209715200,
"RestartPolicy": {
"MaximumRetryCount": 4,
"Name": "on-failure"
}
}Response
The container has been updated.
Example response
{
"Warnings": [
"Published ports are discarded when using host network mode"
]
}