MCPcopy Index your code
hub / github.com/docker/cli / newRemoveCommand

Function newRemoveCommand

cli/command/checkpoint/remove.go:14–37  ·  view source on GitHub ↗
(dockerCLI command.Cli)

Source from the content-addressed store, hash-verified

12}
13
14func newRemoveCommand(dockerCLI command.Cli) *cobra.Command {
15 var opts removeOptions
16
17 cmd := &cobra.Command{
18 Use: "rm [OPTIONS] CONTAINER CHECKPOINT",
19 Aliases: []string{"remove"},
20 Short: "Remove a checkpoint",
21 Args: cli.ExactArgs(2),
22 RunE: func(cmd *cobra.Command, args []string) error {
23 containerID, checkpointID := args[0], args[1]
24 _, err := dockerCLI.Client().CheckpointRemove(cmd.Context(), containerID, client.CheckpointRemoveOptions{
25 CheckpointID: checkpointID,
26 CheckpointDir: opts.checkpointDir,
27 })
28 return err
29 },
30 DisableFlagsInUseLine: true,
31 }
32
33 flags := cmd.Flags()
34 flags.StringVar(&opts.checkpointDir, "checkpoint-dir", "", "Use a custom checkpoint storage directory")
35
36 return cmd
37}

Callers 3

newCheckpointCommandFunction · 0.70

Calls 2

CheckpointRemoveMethod · 0.80
ClientMethod · 0.65

Tested by 2

Used in the wild real call sites across dependent graphs

searching dependent graphs…