checkpoint_create.go 430 B

12345678910111213
  1. package client
  2. import (
  3. "github.com/docker/docker/api/types"
  4. "golang.org/x/net/context"
  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 types.CheckpointCreateOptions) error {
  8. resp, err := cli.post(ctx, "/containers/"+container+"/checkpoints", nil, options, nil)
  9. ensureReaderClosed(resp)
  10. return err
  11. }