1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #28922 from yuexiao-wang/fix-secret

Fix the inconsistency for secret ls and secrect rm
This commit is contained in:
Sebastiaan van Stijn 2016-12-01 11:29:58 +01:00 committed by GitHub
commit a3be176f13
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

@ -21,9 +21,10 @@ func newSecretListCommand(dockerCli *command.DockerCli) *cobra.Command {
opts := listOptions{} opts := listOptions{}
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "ls [OPTIONS]", Use: "ls [OPTIONS]",
Short: "List secrets", Aliases: []string{"list"},
Args: cli.NoArgs, Short: "List secrets",
Args: cli.NoArgs,
RunE: func(cmd *cobra.Command, args []string) error { RunE: func(cmd *cobra.Command, args []string) error {
return runSecretList(dockerCli, opts) return runSecretList(dockerCli, opts)
}, },

View file

@ -16,9 +16,10 @@ 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...]",
Short: "Remove one or more secrets", Aliases: []string{"remove"},
Args: cli.RequiresMinArgs(1), Short: "Remove one or more secrets",
Args: cli.RequiresMinArgs(1),
RunE: func(cmd *cobra.Command, args []string) error { RunE: func(cmd *cobra.Command, args []string) error {
opts := removeOptions{ opts := removeOptions{
names: args, names: args,

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