2016-09-08 13:11:39 -04:00
|
|
|
package service
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/spf13/cobra"
|
|
|
|
|
2017-04-17 18:07:56 -04:00
|
|
|
"github.com/docker/cli/cli"
|
|
|
|
"github.com/docker/cli/cli/command"
|
2016-09-08 13:11:39 -04:00
|
|
|
)
|
|
|
|
|
|
|
|
// NewServiceCommand returns a cobra command for `service` subcommands
|
2017-10-11 12:18:27 -04:00
|
|
|
func NewServiceCommand(dockerCli command.Cli) *cobra.Command {
|
2016-09-08 13:11:39 -04:00
|
|
|
cmd := &cobra.Command{
|
2017-12-06 05:15:36 -05:00
|
|
|
Use: "service",
|
|
|
|
Short: "Manage services",
|
|
|
|
Args: cli.NoArgs,
|
|
|
|
RunE: command.ShowHelp(dockerCli.Err()),
|
|
|
|
Annotations: map[string]string{
|
|
|
|
"version": "1.24",
|
|
|
|
"swarm": "",
|
|
|
|
},
|
2016-09-08 13:11:39 -04:00
|
|
|
}
|
|
|
|
cmd.AddCommand(
|
|
|
|
newCreateCommand(dockerCli),
|
|
|
|
newInspectCommand(dockerCli),
|
|
|
|
newPsCommand(dockerCli),
|
|
|
|
newListCommand(dockerCli),
|
|
|
|
newRemoveCommand(dockerCli),
|
|
|
|
newScaleCommand(dockerCli),
|
|
|
|
newUpdateCommand(dockerCli),
|
2016-10-26 04:19:32 -04:00
|
|
|
newLogsCommand(dockerCli),
|
2017-07-20 04:32:51 -04:00
|
|
|
newRollbackCommand(dockerCli),
|
2016-09-08 13:11:39 -04:00
|
|
|
)
|
|
|
|
return cmd
|
|
|
|
}
|