1package client // import "github.com/docker/docker/client"
2
3import (
4	"context"
5	"encoding/json"
6
7	"github.com/docker/docker/api/types/container"
8)
9
10// ContainerUpdate updates resources of a container
11func (cli *Client) ContainerUpdate(ctx context.Context, containerID string, updateConfig container.UpdateConfig) (container.ContainerUpdateOKBody, error) {
12	var response container.ContainerUpdateOKBody
13	serverResp, err := cli.post(ctx, "/containers/"+containerID+"/update", nil, updateConfig, nil)
14	defer ensureReaderClosed(serverResp)
15	if err != nil {
16		return response, err
17	}
18
19	err = json.NewDecoder(serverResp.body).Decode(&response)
20	return response, err
21}
22