2016-09-08 13:11:39 -04:00
|
|
|
package plugin
|
|
|
|
|
|
|
|
import (
|
2016-10-06 10:09:54 -04:00
|
|
|
"fmt"
|
|
|
|
|
|
|
|
"github.com/docker/docker/cli"
|
2016-09-08 13:11:39 -04:00
|
|
|
"github.com/docker/docker/cli/command"
|
|
|
|
"github.com/spf13/cobra"
|
|
|
|
)
|
|
|
|
|
|
|
|
// NewPluginCommand returns a cobra command for `plugin` subcommands
|
2016-09-19 14:31:53 -04:00
|
|
|
func NewPluginCommand(dockerCli *command.DockerCli) *cobra.Command {
|
2016-10-06 10:09:54 -04:00
|
|
|
cmd := &cobra.Command{
|
|
|
|
Use: "plugin",
|
|
|
|
Short: "Manage plugins",
|
|
|
|
Args: cli.NoArgs,
|
|
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
|
|
fmt.Fprintf(dockerCli.Err(), "\n"+cmd.UsageString())
|
|
|
|
},
|
2016-11-03 20:12:15 -04:00
|
|
|
Tags: map[string]string{"experimental": ""},
|
2016-10-06 10:09:54 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
cmd.AddCommand(
|
|
|
|
newDisableCommand(dockerCli),
|
|
|
|
newEnableCommand(dockerCli),
|
|
|
|
newInspectCommand(dockerCli),
|
|
|
|
newInstallCommand(dockerCli),
|
|
|
|
newListCommand(dockerCli),
|
|
|
|
newRemoveCommand(dockerCli),
|
|
|
|
newSetCommand(dockerCli),
|
|
|
|
newPushCommand(dockerCli),
|
|
|
|
)
|
|
|
|
return cmd
|
2016-09-08 13:11:39 -04:00
|
|
|
}
|