gopkg.in/docker/docker.v20@v20.10.27/client/container_pause.go (about)

     1  package client // import "github.com/docker/docker/client"
     2  
     3  import "context"
     4  
     5  // ContainerPause pauses the main process of a given container without terminating it.
     6  func (cli *Client) ContainerPause(ctx context.Context, containerID string) error {
     7  	resp, err := cli.post(ctx, "/containers/"+containerID+"/pause", nil, nil, nil)
     8  	ensureReaderClosed(resp)
     9  	return err
    10  }