mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
small secret doc update
Signed-off-by: Victor Vieux <vieux@docker.com>
This commit is contained in:
parent
f0a13eb620
commit
91b739b552
1 changed files with 7 additions and 7 deletions
|
@ -34,32 +34,32 @@ command on a manager node.
|
|||
### Create a secret
|
||||
|
||||
```bash
|
||||
$ cat secret.json | docker secret create -f - secret.json
|
||||
$ echo <secret> | docker secret create -f - my_secret
|
||||
mhv17xfe3gh6xc4rij5orpfds
|
||||
|
||||
$ docker secret ls
|
||||
ID NAME CREATED UPDATED SIZE
|
||||
mhv17xfe3gh6xc4rij5orpfds secret.json 2016-10-27 23:25:43.909181089 +0000 UTC 2016-10-27 23:25:43.909181089 +0000 UTC 1679
|
||||
mhv17xfe3gh6xc4rij5orpfds my_secret 2016-10-27 23:25:43.909181089 +0000 UTC 2016-10-27 23:25:43.909181089 +0000 UTC 1679
|
||||
```
|
||||
|
||||
### Create a secret with a file
|
||||
|
||||
```bash
|
||||
$ docker secret create --file secret.in secret.json
|
||||
$ docker secret create -f secret.json my_secret
|
||||
mhv17xfe3gh6xc4rij5orpfds
|
||||
|
||||
$ docker secret ls
|
||||
ID NAME CREATED UPDATED SIZE
|
||||
mhv17xfe3gh6xc4rij5orpfds secret.json 2016-10-27 23:25:43.909181089 +0000 UTC 2016-10-27 23:25:43.909181089 +0000 UTC 1679
|
||||
mhv17xfe3gh6xc4rij5orpfds my_secret 2016-10-27 23:25:43.909181089 +0000 UTC 2016-10-27 23:25:43.909181089 +0000 UTC 1679
|
||||
```
|
||||
|
||||
### Create a secret with labels
|
||||
|
||||
```bash
|
||||
$ cat secret.json | docker secret create secret.json -f - --label env=dev --label rev=20161102
|
||||
$ docker secret create -f secret.json --label env=dev --label rev=20161102 my_secret
|
||||
jtn7g6aukl5ky7nr9gvwafoxh
|
||||
|
||||
$ docker secret inspect secret.json
|
||||
$ docker secret inspect my_secret
|
||||
[
|
||||
{
|
||||
"ID": "jtn7g6aukl5ky7nr9gvwafoxh",
|
||||
|
@ -69,7 +69,7 @@ $ docker secret inspect secret.json
|
|||
"CreatedAt": "2016-11-03T20:54:12.924766548Z",
|
||||
"UpdatedAt": "2016-11-03T20:54:12.924766548Z",
|
||||
"Spec": {
|
||||
"Name": "secret.json",
|
||||
"Name": "my_secret",
|
||||
"Labels": {
|
||||
"env": "dev",
|
||||
"rev": "20161102"
|
||||
|
|
Loading…
Reference in a new issue