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

Function newContainerCommand

cli/command/container/cmd.go:38–75  ·  view source on GitHub ↗

newContainerCommand returns a cobra command for `container` subcommands

(dockerCLI command.Cli)

Source from the content-addressed store, hash-verified

36
37// newContainerCommand returns a cobra command for `container` subcommands
38func newContainerCommand(dockerCLI command.Cli) *cobra.Command {
39 cmd := &cobra.Command{
40 Use: "container",
41 Short: "Manage containers",
42 Args: cli.NoArgs,
43 RunE: command.ShowHelp(dockerCLI.Err()),
44
45 DisableFlagsInUseLine: true,
46 }
47 cmd.AddCommand(
48 newAttachCommand(dockerCLI),
49 newCommitCommand(dockerCLI),
50 newCopyCommand(dockerCLI),
51 newCreateCommand(dockerCLI),
52 newDiffCommand(dockerCLI),
53 newExecCommand(dockerCLI),
54 newExportCommand(dockerCLI),
55 newKillCommand(dockerCLI),
56 newLogsCommand(dockerCLI),
57 newPauseCommand(dockerCLI),
58 newPortCommand(dockerCLI),
59 newRenameCommand(dockerCLI),
60 newRestartCommand(dockerCLI),
61 newRemoveCommand(dockerCLI),
62 newRunCommand(dockerCLI),
63 newStartCommand(dockerCLI),
64 newStatsCommand(dockerCLI),
65 newStopCommand(dockerCLI),
66 newTopCommand(dockerCLI),
67 newUnpauseCommand(dockerCLI),
68 newUpdateCommand(dockerCLI),
69 newWaitCommand(dockerCLI),
70 newListCommand(dockerCLI),
71 newInspectCommand(dockerCLI),
72 newPruneCommand(dockerCLI),
73 )
74 return cmd
75}

Callers

nothing calls this directly

Calls 15

newAttachCommandFunction · 0.85
newCommitCommandFunction · 0.85
newCopyCommandFunction · 0.85
newDiffCommandFunction · 0.85
newExecCommandFunction · 0.85
newKillCommandFunction · 0.85
newPauseCommandFunction · 0.85
newPortCommandFunction · 0.85
newRenameCommandFunction · 0.85
newRestartCommandFunction · 0.85
newRunCommandFunction · 0.85
newStartCommandFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…