Files
docker-cli/components/cli/client/container_pause.go
Daniel Nephin 27d281716f Import docker/docker/client
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
Upstream-commit: e8a454d8a6
Component: cli
2017-04-17 17:41:20 -04:00

11 lines
341 B
Go

package client
import "golang.org/x/net/context"
// ContainerPause pauses the main process of a given container without terminating it.
func (cli *Client) ContainerPause(ctx context.Context, containerID string) error {
resp, err := cli.post(ctx, "/containers/"+containerID+"/pause", nil, nil, nil)
ensureReaderClosed(resp)
return err
}