2016-06-23 13:03:40 -04:00
|
|
|
package container
|
|
|
|
|
|
|
|
import (
|
2017-04-17 18:07:56 -04:00
|
|
|
"github.com/docker/cli/cli"
|
|
|
|
"github.com/docker/cli/cli/command"
|
2016-12-24 19:05:37 -05:00
|
|
|
"github.com/spf13/cobra"
|
2016-06-23 13:03:40 -04:00
|
|
|
)
|
|
|
|
|
|
|
|
// NewContainerCommand returns a cobra command for `container` subcommands
|
2017-10-11 12:18:27 -04:00
|
|
|
func NewContainerCommand(dockerCli command.Cli) *cobra.Command {
|
2016-06-23 13:03:40 -04:00
|
|
|
cmd := &cobra.Command{
|
|
|
|
Use: "container",
|
2016-09-12 11:37:00 -04:00
|
|
|
Short: "Manage containers",
|
2016-06-23 13:03:40 -04:00
|
|
|
Args: cli.NoArgs,
|
2017-05-03 17:58:52 -04:00
|
|
|
RunE: command.ShowHelp(dockerCli.Err()),
|
2016-06-23 13:03:40 -04:00
|
|
|
}
|
|
|
|
cmd.AddCommand(
|
|
|
|
NewAttachCommand(dockerCli),
|
|
|
|
NewCommitCommand(dockerCli),
|
|
|
|
NewCopyCommand(dockerCli),
|
|
|
|
NewCreateCommand(dockerCli),
|
|
|
|
NewDiffCommand(dockerCli),
|
|
|
|
NewExecCommand(dockerCli),
|
|
|
|
NewExportCommand(dockerCli),
|
|
|
|
NewKillCommand(dockerCli),
|
|
|
|
NewLogsCommand(dockerCli),
|
|
|
|
NewPauseCommand(dockerCli),
|
|
|
|
NewPortCommand(dockerCli),
|
|
|
|
NewRenameCommand(dockerCli),
|
|
|
|
NewRestartCommand(dockerCli),
|
|
|
|
NewRmCommand(dockerCli),
|
|
|
|
NewRunCommand(dockerCli),
|
|
|
|
NewStartCommand(dockerCli),
|
|
|
|
NewStatsCommand(dockerCli),
|
|
|
|
NewStopCommand(dockerCli),
|
|
|
|
NewTopCommand(dockerCli),
|
|
|
|
NewUnpauseCommand(dockerCli),
|
|
|
|
NewUpdateCommand(dockerCli),
|
|
|
|
NewWaitCommand(dockerCli),
|
|
|
|
newListCommand(dockerCli),
|
|
|
|
newInspectCommand(dockerCli),
|
2016-09-22 17:04:34 -04:00
|
|
|
NewPruneCommand(dockerCli),
|
2016-06-23 13:03:40 -04:00
|
|
|
)
|
|
|
|
return cmd
|
|
|
|
}
|