Fix the inconsistency for docker secret

Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
This commit is contained in:
yuexiao-wang 2016-11-29 23:44:12 +08:00
parent 1ef10c83c7
commit b4306588e9
4 changed files with 11 additions and 9 deletions

View File

@ -25,7 +25,7 @@ func newSecretInspectCommand(dockerCli *command.DockerCli) *cobra.Command {
}, },
} }
cmd.Flags().StringVarP(&opts.format, "format", "f", "", "Format the output using the given go template") cmd.Flags().StringVarP(&opts.format, "format", "f", "", "Format the output using the given Go template")
return cmd return cmd
} }

View File

@ -22,6 +22,7 @@ func newSecretListCommand(dockerCli *command.DockerCli) *cobra.Command {
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "ls [OPTIONS]", Use: "ls [OPTIONS]",
Aliases: []string{"list"},
Short: "List secrets", Short: "List secrets",
Args: cli.NoArgs, Args: cli.NoArgs,
RunE: func(cmd *cobra.Command, args []string) error { RunE: func(cmd *cobra.Command, args []string) error {

View File

@ -16,6 +16,7 @@ type removeOptions struct {
func newSecretRemoveCommand(dockerCli *command.DockerCli) *cobra.Command { func newSecretRemoveCommand(dockerCli *command.DockerCli) *cobra.Command {
return &cobra.Command{ return &cobra.Command{
Use: "rm SECRET [SECRET...]", Use: "rm SECRET [SECRET...]",
Aliases: []string{"remove"},
Short: "Remove one or more secrets", Short: "Remove one or more secrets",
Args: cli.RequiresMinArgs(1), Args: cli.RequiresMinArgs(1),
RunE: func(cmd *cobra.Command, args []string) error { RunE: func(cmd *cobra.Command, args []string) error {

View File

@ -27,9 +27,9 @@ Options:
-q, --quiet Only display IDs -q, --quiet Only display IDs
``` ```
Run this command from a manager to list the secrets in the Swarm. Run this command on a manager node to list the secrets in the Swarm.
On a manager node: ## Examples
```bash ```bash
$ docker secret ls $ docker secret ls