mirror of https://github.com/docker/cli.git
secrets: use explicit format when using secrets
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
This commit is contained in:
parent
f0026b6e12
commit
32a96e4fa4
|
@ -126,7 +126,7 @@ Use the `--secret` flag to give a container access to a
|
|||
with two secrets named `ssh-key` and `app-key`:
|
||||
|
||||
```bash
|
||||
$ docker service create --name redis --secret ssh-key:ssh --secret app-key:app redis:3.0.6
|
||||
$ docker service create --name redis --secret source=ssh-key,target=ssh --secret source=app-key,target=app,uid=1000,gid=1001,mode=0400 redis:3.0.6
|
||||
4cdgfyky7ozwh3htjfw0d12qv
|
||||
```
|
||||
|
||||
|
|
|
@ -157,7 +157,7 @@ The following example adds a secret named `ssh-2` and removes `ssh-1`:
|
|||
|
||||
```bash
|
||||
$ docker service update \
|
||||
--secret-add ssh-2 \
|
||||
--secret-add source=ssh-2,target=ssh-2 \
|
||||
--secret-rm ssh-1 \
|
||||
myservice
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue