2016-09-19 13:38:58 -04:00
|
|
|
package system
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
|
|
|
|
"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) {
|
|
|
|
fmt.Fprintf(dockerCli.Err(), "\n"+cmd.UsageString())
|
|
|
|
},
|
|
|
|
}
|
|
|
|
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
|
|
|
)
|
|
|
|
return cmd
|
|
|
|
}
|