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
13 lines
344 B
Go
13 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
|
|
}
|