mirror of
https://github.com/docker/cli.git
synced 2026-01-18 08:21:31 +03:00
secrets: use explicit format when using secrets
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: 32a96e4fa4
Component: cli
This commit is contained in:
@@ -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
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user