Update reference documentation

Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Silvin Lubecki
2021-03-10 00:49:33 +01:00
committed by Sebastiaan van Stijn
parent 0611be0f09
commit b4af799686
14 changed files with 164 additions and 16 deletions

View File

@ -20,7 +20,12 @@ Options:
- driver=<string> a volume's driver name
- label=<key> or label=<key>=<value>
- name=<string> a volume's name
--format string Pretty-print volumes using a Go template
--format string Format output using a custom template:
'table': Print output in table format with column headers (default)
'table TEMPLATE': Print output in table format using the given Go template
'json': Print in JSON format
'TEMPLATE': Print output using the given Go template.
Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates
--help Print usage
-q, --quiet Only display volume names
```
@ -182,6 +187,12 @@ vol2: local
vol3: local
```
To list all volumes in JSON format, use the `json` directive:
```console
$ docker volume ls --format json
{"Driver":"local","Labels":"","Links":"N/A","Mountpoint":"/var/lib/docker/volumes/docker-cli-dev-cache/_data","Name":"docker-cli-dev-cache","Scope":"local","Size":"N/A"}
```
## Related commands
* [volume create](volume_create.md)