mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
![Qiang Huang](/assets/img/avatar_default.png)
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>
12 lines
344 B
Go
12 lines
344 B
Go
package lib
|
|
|
|
import (
|
|
"github.com/docker/docker/api/types/container"
|
|
)
|
|
|
|
// ContainerUpdate updates resources of a container
|
|
func (cli *Client) ContainerUpdate(containerID string, hostConfig container.HostConfig) error {
|
|
resp, err := cli.post("/containers/"+containerID+"/update", nil, hostConfig, nil)
|
|
ensureReaderClosed(resp)
|
|
return err
|
|
}
|