update command description in CLI
Signed-off-by: allencloud <allen.sun@daocloud.io>
This commit is contained in:
parent
da168a5469
commit
6c5988ed8c
|
@ -23,7 +23,7 @@ func NewKillCommand(dockerCli *client.DockerCli) *cobra.Command {
|
||||||
|
|
||||||
cmd := &cobra.Command{
|
cmd := &cobra.Command{
|
||||||
Use: "kill [OPTIONS] CONTAINER [CONTAINER...]",
|
Use: "kill [OPTIONS] CONTAINER [CONTAINER...]",
|
||||||
Short: "Kill one or more running container",
|
Short: "Kill one or more running containers",
|
||||||
Args: cli.RequiresMinArgs(1),
|
Args: cli.RequiresMinArgs(1),
|
||||||
RunE: func(cmd *cobra.Command, args []string) error {
|
RunE: func(cmd *cobra.Command, args []string) error {
|
||||||
opts.containers = args
|
opts.containers = args
|
||||||
|
|
|
@ -42,7 +42,7 @@ func NewPsCommand(dockerCli *client.DockerCli) *cobra.Command {
|
||||||
cmd := &cobra.Command{
|
cmd := &cobra.Command{
|
||||||
Use: "ps [OPTIONS]",
|
Use: "ps [OPTIONS]",
|
||||||
Short: "List containers",
|
Short: "List containers",
|
||||||
Args: cli.ExactArgs(0),
|
Args: cli.NoArgs,
|
||||||
RunE: func(cmd *cobra.Command, args []string) error {
|
RunE: func(cmd *cobra.Command, args []string) error {
|
||||||
return runPs(dockerCli, &opts)
|
return runPs(dockerCli, &opts)
|
||||||
},
|
},
|
||||||
|
|
|
@ -12,9 +12,9 @@ import (
|
||||||
|
|
||||||
func newRemoveCommand(dockerCli *client.DockerCli) *cobra.Command {
|
func newRemoveCommand(dockerCli *client.DockerCli) *cobra.Command {
|
||||||
return &cobra.Command{
|
return &cobra.Command{
|
||||||
Use: "rm NETWORK [NETWORK]...",
|
Use: "rm NETWORK [NETWORK...]",
|
||||||
Aliases: []string{"remove"},
|
Aliases: []string{"remove"},
|
||||||
Short: "Remove a network",
|
Short: "Remove one or more networks",
|
||||||
Args: cli.RequiresMinArgs(1),
|
Args: cli.RequiresMinArgs(1),
|
||||||
RunE: func(cmd *cobra.Command, args []string) error {
|
RunE: func(cmd *cobra.Command, args []string) error {
|
||||||
return runRemove(dockerCli, args)
|
return runRemove(dockerCli, args)
|
||||||
|
|
|
@ -12,7 +12,7 @@ import (
|
||||||
func newDemoteCommand(dockerCli *client.DockerCli) *cobra.Command {
|
func newDemoteCommand(dockerCli *client.DockerCli) *cobra.Command {
|
||||||
return &cobra.Command{
|
return &cobra.Command{
|
||||||
Use: "demote NODE [NODE...]",
|
Use: "demote NODE [NODE...]",
|
||||||
Short: "Demote a node from manager in the swarm",
|
Short: "Demote one or more nodes from manager in the swarm",
|
||||||
Args: cli.RequiresMinArgs(1),
|
Args: cli.RequiresMinArgs(1),
|
||||||
RunE: func(cmd *cobra.Command, args []string) error {
|
RunE: func(cmd *cobra.Command, args []string) error {
|
||||||
return runDemote(dockerCli, args)
|
return runDemote(dockerCli, args)
|
||||||
|
|
|
@ -12,7 +12,7 @@ import (
|
||||||
func newPromoteCommand(dockerCli *client.DockerCli) *cobra.Command {
|
func newPromoteCommand(dockerCli *client.DockerCli) *cobra.Command {
|
||||||
return &cobra.Command{
|
return &cobra.Command{
|
||||||
Use: "promote NODE [NODE...]",
|
Use: "promote NODE [NODE...]",
|
||||||
Short: "Promote a node to a manager in the swarm",
|
Short: "Promote one or more nodes to manager in the swarm",
|
||||||
Args: cli.RequiresMinArgs(1),
|
Args: cli.RequiresMinArgs(1),
|
||||||
RunE: func(cmd *cobra.Command, args []string) error {
|
RunE: func(cmd *cobra.Command, args []string) error {
|
||||||
return runPromote(dockerCli, args)
|
return runPromote(dockerCli, args)
|
||||||
|
|
|
@ -14,7 +14,7 @@ func newRemoveCommand(dockerCli *client.DockerCli) *cobra.Command {
|
||||||
return &cobra.Command{
|
return &cobra.Command{
|
||||||
Use: "rm NODE [NODE...]",
|
Use: "rm NODE [NODE...]",
|
||||||
Aliases: []string{"remove"},
|
Aliases: []string{"remove"},
|
||||||
Short: "Remove a node from the swarm",
|
Short: "Remove one or more nodes from the swarm",
|
||||||
Args: cli.RequiresMinArgs(1),
|
Args: cli.RequiresMinArgs(1),
|
||||||
RunE: func(cmd *cobra.Command, args []string) error {
|
RunE: func(cmd *cobra.Command, args []string) error {
|
||||||
return runRemove(dockerCli, args)
|
return runRemove(dockerCli, args)
|
||||||
|
|
|
@ -27,7 +27,7 @@ func newInstallCommand(dockerCli *client.DockerCli) *cobra.Command {
|
||||||
cmd := &cobra.Command{
|
cmd := &cobra.Command{
|
||||||
Use: "install [OPTIONS] PLUGIN",
|
Use: "install [OPTIONS] PLUGIN",
|
||||||
Short: "Install a plugin",
|
Short: "Install a plugin",
|
||||||
Args: cli.RequiresMinArgs(1), // TODO: allow for set args
|
Args: cli.ExactArgs(1), // TODO: allow for set args
|
||||||
RunE: func(cmd *cobra.Command, args []string) error {
|
RunE: func(cmd *cobra.Command, args []string) error {
|
||||||
options.name = args[0]
|
options.name = args[0]
|
||||||
return runInstall(dockerCli, options)
|
return runInstall(dockerCli, options)
|
||||||
|
|
|
@ -17,7 +17,7 @@ func newListCommand(dockerCli *client.DockerCli) *cobra.Command {
|
||||||
Use: "ls",
|
Use: "ls",
|
||||||
Short: "List plugins",
|
Short: "List plugins",
|
||||||
Aliases: []string{"list"},
|
Aliases: []string{"list"},
|
||||||
Args: cli.ExactArgs(0),
|
Args: cli.NoArgs,
|
||||||
RunE: func(cmd *cobra.Command, args []string) error {
|
RunE: func(cmd *cobra.Command, args []string) error {
|
||||||
return runList(dockerCli)
|
return runList(dockerCli)
|
||||||
},
|
},
|
||||||
|
|
|
@ -17,7 +17,7 @@ func newRemoveCommand(dockerCli *client.DockerCli) *cobra.Command {
|
||||||
Use: "rm PLUGIN",
|
Use: "rm PLUGIN",
|
||||||
Short: "Remove a plugin",
|
Short: "Remove a plugin",
|
||||||
Aliases: []string{"remove"},
|
Aliases: []string{"remove"},
|
||||||
Args: cli.RequiresMinArgs(1),
|
Args: cli.ExactArgs(1),
|
||||||
RunE: func(cmd *cobra.Command, args []string) error {
|
RunE: func(cmd *cobra.Command, args []string) error {
|
||||||
return runRemove(dockerCli, args)
|
return runRemove(dockerCli, args)
|
||||||
},
|
},
|
||||||
|
|
|
@ -15,7 +15,7 @@ func newRemoveCommand(dockerCli *client.DockerCli) *cobra.Command {
|
||||||
cmd := &cobra.Command{
|
cmd := &cobra.Command{
|
||||||
Use: "rm [OPTIONS] SERVICE [SERVICE...]",
|
Use: "rm [OPTIONS] SERVICE [SERVICE...]",
|
||||||
Aliases: []string{"remove"},
|
Aliases: []string{"remove"},
|
||||||
Short: "Remove a service",
|
Short: "Remove one or more services",
|
||||||
Args: cli.RequiresMinArgs(1),
|
Args: cli.RequiresMinArgs(1),
|
||||||
RunE: func(cmd *cobra.Command, args []string) error {
|
RunE: func(cmd *cobra.Command, args []string) error {
|
||||||
return runRemove(dockerCli, args)
|
return runRemove(dockerCli, args)
|
||||||
|
|
|
@ -21,7 +21,7 @@ func NewInfoCommand(dockerCli *client.DockerCli) *cobra.Command {
|
||||||
cmd := &cobra.Command{
|
cmd := &cobra.Command{
|
||||||
Use: "info",
|
Use: "info",
|
||||||
Short: "Display system-wide information",
|
Short: "Display system-wide information",
|
||||||
Args: cli.ExactArgs(0),
|
Args: cli.NoArgs,
|
||||||
RunE: func(cmd *cobra.Command, args []string) error {
|
RunE: func(cmd *cobra.Command, args []string) error {
|
||||||
return runInfo(dockerCli)
|
return runInfo(dockerCli)
|
||||||
},
|
},
|
||||||
|
|
|
@ -44,7 +44,7 @@ func NewVersionCommand(dockerCli *client.DockerCli) *cobra.Command {
|
||||||
cmd := &cobra.Command{
|
cmd := &cobra.Command{
|
||||||
Use: "version [OPTIONS]",
|
Use: "version [OPTIONS]",
|
||||||
Short: "Show the Docker version information",
|
Short: "Show the Docker version information",
|
||||||
Args: cli.ExactArgs(0),
|
Args: cli.NoArgs,
|
||||||
RunE: func(cmd *cobra.Command, args []string) error {
|
RunE: func(cmd *cobra.Command, args []string) error {
|
||||||
return runVersion(dockerCli, &opts)
|
return runVersion(dockerCli, &opts)
|
||||||
},
|
},
|
||||||
|
|
|
@ -12,9 +12,9 @@ import (
|
||||||
|
|
||||||
func newRemoveCommand(dockerCli *client.DockerCli) *cobra.Command {
|
func newRemoveCommand(dockerCli *client.DockerCli) *cobra.Command {
|
||||||
return &cobra.Command{
|
return &cobra.Command{
|
||||||
Use: "rm VOLUME [VOLUME]...",
|
Use: "rm VOLUME [VOLUME...]",
|
||||||
Aliases: []string{"remove"},
|
Aliases: []string{"remove"},
|
||||||
Short: "Remove a volume",
|
Short: "Remove one or more volumes",
|
||||||
Long: removeDescription,
|
Long: removeDescription,
|
||||||
Example: removeExample,
|
Example: removeExample,
|
||||||
Args: cli.RequiresMinArgs(1),
|
Args: cli.RequiresMinArgs(1),
|
||||||
|
@ -45,7 +45,7 @@ func runRemove(dockerCli *client.DockerCli, volumes []string) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
var removeDescription = `
|
var removeDescription = `
|
||||||
Removes one or more volumes. You cannot remove a volume that is in use by a container.
|
Remove one or more volumes. You cannot remove a volume that is in use by a container.
|
||||||
`
|
`
|
||||||
|
|
||||||
var removeExample = `
|
var removeExample = `
|
||||||
|
|
|
@ -786,7 +786,7 @@ __docker_node_commands() {
|
||||||
"inspect:Display detailed information on one or more nodes"
|
"inspect:Display detailed information on one or more nodes"
|
||||||
"ls:List nodes in the swarm"
|
"ls:List nodes in the swarm"
|
||||||
"promote:Promote a node as manager in the swarm"
|
"promote:Promote a node as manager in the swarm"
|
||||||
"rm:Remove a node from the swarm"
|
"rm:Remove one or more nodes from the swarm"
|
||||||
"ps:List tasks running on a node"
|
"ps:List tasks running on a node"
|
||||||
"update:Update a node"
|
"update:Update a node"
|
||||||
)
|
)
|
||||||
|
@ -1058,7 +1058,7 @@ __docker_service_commands() {
|
||||||
"create:Create a new service"
|
"create:Create a new service"
|
||||||
"inspect:Display detailed information on one or more services"
|
"inspect:Display detailed information on one or more services"
|
||||||
"ls:List services"
|
"ls:List services"
|
||||||
"rm:Remove a service"
|
"rm:Remove one or more services"
|
||||||
"scale:Scale one or multiple services"
|
"scale:Scale one or multiple services"
|
||||||
"ps:List the tasks of a service"
|
"ps:List the tasks of a service"
|
||||||
"update:Update a service"
|
"update:Update a service"
|
||||||
|
@ -1314,7 +1314,7 @@ __docker_volume_commands() {
|
||||||
"create:Create a volume"
|
"create:Create a volume"
|
||||||
"inspect:Display detailed information on one or more volumes"
|
"inspect:Display detailed information on one or more volumes"
|
||||||
"ls:List volumes"
|
"ls:List volumes"
|
||||||
"rm:Remove a volume"
|
"rm:Remove one or more volumes"
|
||||||
)
|
)
|
||||||
_describe -t docker-volume-commands "docker volume command" _docker_volume_subcommands
|
_describe -t docker-volume-commands "docker volume command" _docker_volume_subcommands
|
||||||
}
|
}
|
||||||
|
|
|
@ -117,7 +117,7 @@ read the [`dockerd`](dockerd.md) reference page.
|
||||||
| [node update](node_update.md) | Update attributes for a node |
|
| [node update](node_update.md) | Update attributes for a node |
|
||||||
| [node ps](node_ps.md) | List tasks running on a node |
|
| [node ps](node_ps.md) | List tasks running on a node |
|
||||||
| [node ls](node_ls.md) | List nodes in the swarm |
|
| [node ls](node_ls.md) | List nodes in the swarm |
|
||||||
| [node rm](node_rm.md) | Remove a node from the swarm |
|
| [node rm](node_rm.md) | Remove one or more nodes from the swarm |
|
||||||
|
|
||||||
### Swarm swarm commands
|
### Swarm swarm commands
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ parent = "smn_cli"
|
||||||
```markdown
|
```markdown
|
||||||
Usage: docker kill [OPTIONS] CONTAINER [CONTAINER...]
|
Usage: docker kill [OPTIONS] CONTAINER [CONTAINER...]
|
||||||
|
|
||||||
Kill one or more running container
|
Kill one or more running containers
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
--help Print usage
|
--help Print usage
|
||||||
|
|
|
@ -11,9 +11,9 @@ parent = "smn_cli"
|
||||||
# network rm
|
# network rm
|
||||||
|
|
||||||
```markdown
|
```markdown
|
||||||
Usage: docker network rm NETWORK [NETWORK]...
|
Usage: docker network rm NETWORK [NETWORK...]
|
||||||
|
|
||||||
Remove a network
|
Remove one or more networks
|
||||||
|
|
||||||
Aliases:
|
Aliases:
|
||||||
rm, remove
|
rm, remove
|
||||||
|
|
|
@ -13,7 +13,7 @@ parent = "smn_cli"
|
||||||
```markdown
|
```markdown
|
||||||
Usage: docker node demote NODE [NODE...]
|
Usage: docker node demote NODE [NODE...]
|
||||||
|
|
||||||
Demote a node from manager in the swarm
|
Demote one or more nodes from manager in the swarm
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
--help Print usage
|
--help Print usage
|
||||||
|
|
|
@ -13,7 +13,7 @@ parent = "smn_cli"
|
||||||
```markdown
|
```markdown
|
||||||
Usage: docker node promote NODE [NODE...]
|
Usage: docker node promote NODE [NODE...]
|
||||||
|
|
||||||
Promote a node to a manager in the swarm
|
Promote one or more nodes to manager in the swarm
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
--help Print usage
|
--help Print usage
|
||||||
|
|
|
@ -13,7 +13,7 @@ parent = "smn_cli"
|
||||||
```markdown
|
```markdown
|
||||||
Usage: docker node rm NODE [NODE...]
|
Usage: docker node rm NODE [NODE...]
|
||||||
|
|
||||||
Remove a node from the swarm
|
Remove one or more nodes from the swarm
|
||||||
|
|
||||||
Aliases:
|
Aliases:
|
||||||
rm, remove
|
rm, remove
|
||||||
|
|
|
@ -11,9 +11,9 @@ parent = "smn_cli"
|
||||||
# service rm
|
# service rm
|
||||||
|
|
||||||
```Markdown
|
```Markdown
|
||||||
Usage: docker service rm [OPTIONS] SERVICE
|
Usage: docker service rm [OPTIONS] SERVICE [SERVICE...]
|
||||||
|
|
||||||
Remove a service
|
Remove one or more services
|
||||||
|
|
||||||
Aliases:
|
Aliases:
|
||||||
rm, remove
|
rm, remove
|
||||||
|
|
|
@ -11,9 +11,9 @@ parent = "smn_cli"
|
||||||
# volume rm
|
# volume rm
|
||||||
|
|
||||||
```markdown
|
```markdown
|
||||||
Usage: docker volume rm VOLUME [VOLUME]...
|
Usage: docker volume rm VOLUME [VOLUME...]
|
||||||
|
|
||||||
Remove a volume
|
Remove one or more volumes
|
||||||
|
|
||||||
Aliases:
|
Aliases:
|
||||||
rm, remove
|
rm, remove
|
||||||
|
@ -22,7 +22,7 @@ Options:
|
||||||
--help Print usage
|
--help Print usage
|
||||||
```
|
```
|
||||||
|
|
||||||
Removes one or more volumes. You cannot remove a volume that is in use by a container.
|
Remove one or more volumes. You cannot remove a volume that is in use by a container.
|
||||||
|
|
||||||
$ docker volume rm hello
|
$ docker volume rm hello
|
||||||
hello
|
hello
|
||||||
|
|
Loading…
Reference in New Issue