2016-09-19 13:38:58 -04:00
|
|
|
package system
|
|
|
|
|
|
|
|
import (
|
2017-04-17 18:07:56 -04:00
|
|
|
"github.com/docker/cli/cli"
|
|
|
|
"github.com/docker/cli/cli/command"
|
2017-05-03 17:58:52 -04:00
|
|
|
"github.com/spf13/cobra"
|
2016-09-19 13:38:58 -04:00
|
|
|
)
|
|
|
|
|
|
|
|
// NewSystemCommand returns a cobra command for `system` subcommands
|
2017-10-11 12:18:27 -04:00
|
|
|
func NewSystemCommand(dockerCli command.Cli) *cobra.Command {
|
2016-09-19 13:38:58 -04:00
|
|
|
cmd := &cobra.Command{
|
|
|
|
Use: "system",
|
|
|
|
Short: "Manage Docker",
|
|
|
|
Args: cli.NoArgs,
|
2017-05-03 17:58:52 -04:00
|
|
|
RunE: command.ShowHelp(dockerCli.Err()),
|
2016-09-19 13:38:58 -04:00
|
|
|
}
|
|
|
|
cmd.AddCommand(
|
|
|
|
NewEventsCommand(dockerCli),
|
|
|
|
NewInfoCommand(dockerCli),
|
2017-07-18 09:26:45 -04:00
|
|
|
newDiskUsageCommand(dockerCli),
|
|
|
|
newPruneCommand(dockerCli),
|
2018-02-19 04:31:29 -05:00
|
|
|
newDialStdioCommand(dockerCli),
|
2016-09-19 13:38:58 -04:00
|
|
|
)
|
2016-11-02 20:43:32 -04:00
|
|
|
|
2016-09-19 13:38:58 -04:00
|
|
|
return cmd
|
|
|
|
}
|