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

Function newRemoveCommand

cli/command/container/rm.go:66–70  ·  view source on GitHub ↗

newRemoveCommand adds subcommands for "docker container"; unlike the top-level "docker rm", it also adds a "remove" alias to support "docker container remove" in addition to "docker container rm".

(dockerCli command.Cli)

Source from the content-addressed store, hash-verified

64// top-level "docker rm", it also adds a "remove" alias to support
65// "docker container remove" in addition to "docker container rm".
66func newRemoveCommand(dockerCli command.Cli) *cobra.Command {
67 cmd := *newRmCommand(dockerCli)
68 cmd.Aliases = []string{"rm", "remove"}
69 return &cmd
70}
71
72func runRm(ctx context.Context, dockerCLI command.Cli, opts *rmOptions) error {
73 apiClient := dockerCLI.Client()

Callers 1

newContainerCommandFunction · 0.70

Calls 1

newRmCommandFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…