client/container_pause.go
4f0d95fa
 package client // import "github.com/docker/docker/client"
7c36a1af
 
7d62e40f
 import "context"
7c36a1af
 
 // 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
 }