container_update.go 407 B

1234567891011121314
  1. package client
  2. import (
  3. "github.com/docker/engine-api/types/container"
  4. "golang.org/x/net/context"
  5. )
  6. // ContainerUpdate updates resources of a container
  7. func (cli *Client) ContainerUpdate(ctx context.Context, containerID string, updateConfig container.UpdateConfig) error {
  8. resp, err := cli.post(ctx, "/containers/"+containerID+"/update", nil, updateConfig, nil)
  9. ensureReaderClosed(resp)
  10. return err
  11. }