checkpoint_create.go 464 B

1234567891011121314
  1. package client // import "github.com/docker/docker/client"
  2. import (
  3. "context"
  4. "github.com/docker/docker/api/types/checkpoint"
  5. )
  6. // CheckpointCreate creates a checkpoint from the given container with the given name
  7. func (cli *Client) CheckpointCreate(ctx context.Context, container string, options checkpoint.CreateOptions) error {
  8. resp, err := cli.post(ctx, "/containers/"+container+"/checkpoints", nil, options, nil)
  9. ensureReaderClosed(resp)
  10. return err
  11. }