1
0
Fork 0
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:
Victor Vieux 2017-01-03 23:13:31 -08:00
parent f0a13eb620
commit 91b739b552

View file

@ -34,32 +34,32 @@ command on a manager node.
### Create a secret ### Create a secret
```bash ```bash
$ cat secret.json | docker secret create -f - secret.json $ echo <secret> | docker secret create -f - my_secret
mhv17xfe3gh6xc4rij5orpfds mhv17xfe3gh6xc4rij5orpfds
$ docker secret ls $ docker secret ls
ID NAME CREATED UPDATED SIZE 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 ### Create a secret with a file
```bash ```bash
$ docker secret create --file secret.in secret.json $ docker secret create -f secret.json my_secret
mhv17xfe3gh6xc4rij5orpfds mhv17xfe3gh6xc4rij5orpfds
$ docker secret ls $ docker secret ls
ID NAME CREATED UPDATED SIZE 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 ### Create a secret with labels
```bash ```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 jtn7g6aukl5ky7nr9gvwafoxh
$ docker secret inspect secret.json $ docker secret inspect my_secret
[ [
{ {
"ID": "jtn7g6aukl5ky7nr9gvwafoxh", "ID": "jtn7g6aukl5ky7nr9gvwafoxh",
@ -69,7 +69,7 @@ $ docker secret inspect secret.json
"CreatedAt": "2016-11-03T20:54:12.924766548Z", "CreatedAt": "2016-11-03T20:54:12.924766548Z",
"UpdatedAt": "2016-11-03T20:54:12.924766548Z", "UpdatedAt": "2016-11-03T20:54:12.924766548Z",
"Spec": { "Spec": {
"Name": "secret.json", "Name": "my_secret",
"Labels": { "Labels": {
"env": "dev", "env": "dev",
"rev": "20161102" "rev": "20161102"