2016-09-19 13:38:58 -04:00
|
|
|
package system
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/spf13/cobra"
|
|
|
|
|
|
|
|
"github.com/docker/docker/cli"
|
|
|
|
"github.com/docker/docker/cli/command"
|
|
|
|
)
|
|
|
|
|
|
|
|
// NewSystemCommand returns a cobra command for `system` subcommands
|
|
|
|
func NewSystemCommand(dockerCli *command.DockerCli) *cobra.Command {
|
|
|
|
cmd := &cobra.Command{
|
|
|
|
Use: "system",
|
|
|
|
Short: "Manage Docker",
|
|
|
|
Args: cli.NoArgs,
|
|
|
|
Run: func(cmd *cobra.Command, args []string) {
|
2016-11-02 20:43:32 -04:00
|
|
|
cmd.SetOutput(dockerCli.Err())
|
|
|
|
cmd.HelpFunc()(cmd, args)
|
2016-09-19 13:38:58 -04:00
|
|
|
},
|
|
|
|
}
|
|
|
|
cmd.AddCommand(
|
|
|
|
NewEventsCommand(dockerCli),
|
|
|
|
NewInfoCommand(dockerCli),
|
2016-08-23 19:37:37 -04:00
|
|
|
NewDiskUsageCommand(dockerCli),
|
2016-09-22 17:04:34 -04:00
|
|
|
NewPruneCommand(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
|
|
|
|
}
|