runner/vendor/github.com/docker/docker/client/container_pause.go
Casey Lee 940b4385bf fail on error (#20)
ci-via-github-actions
2019-01-23 11:51:22 -08:00

10 lines
368 B
Go

package client // import "github.com/docker/docker/client"
import "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
}