github.com/justincormack/cli@v0.0.0-20201215022714-831ebeae9675/cli/command/container/cmd.go (about) 1 package container 2 3 import ( 4 "github.com/docker/cli/cli" 5 "github.com/docker/cli/cli/command" 6 "github.com/spf13/cobra" 7 ) 8 9 // NewContainerCommand returns a cobra command for `container` subcommands 10 func NewContainerCommand(dockerCli command.Cli) *cobra.Command { 11 cmd := &cobra.Command{ 12 Use: "container", 13 Short: "Manage containers", 14 Args: cli.NoArgs, 15 RunE: command.ShowHelp(dockerCli.Err()), 16 } 17 cmd.AddCommand( 18 NewAttachCommand(dockerCli), 19 NewCommitCommand(dockerCli), 20 NewCopyCommand(dockerCli), 21 NewCreateCommand(dockerCli), 22 NewDiffCommand(dockerCli), 23 NewExecCommand(dockerCli), 24 NewExportCommand(dockerCli), 25 NewKillCommand(dockerCli), 26 NewLogsCommand(dockerCli), 27 NewPauseCommand(dockerCli), 28 NewPortCommand(dockerCli), 29 NewRenameCommand(dockerCli), 30 NewRestartCommand(dockerCli), 31 NewRmCommand(dockerCli), 32 NewRunCommand(dockerCli), 33 NewStartCommand(dockerCli), 34 NewStatsCommand(dockerCli), 35 NewStopCommand(dockerCli), 36 NewTopCommand(dockerCli), 37 NewUnpauseCommand(dockerCli), 38 NewUpdateCommand(dockerCli), 39 NewWaitCommand(dockerCli), 40 newListCommand(dockerCli), 41 newInspectCommand(dockerCli), 42 NewPruneCommand(dockerCli), 43 ) 44 return cmd 45 }