Display detailed information on one or more volumes
$ docker volume inspect [OPTIONS] VOLUME [VOLUME...]
Refer to the options section for an overview of available OPTIONS for this command.
Returns information about a volume. By default, this command renders all results in a JSON array. You can specify an alternate format to execute a given template for each result. Go’s text/template package describes all the details of the format.
For example uses of this command, refer to the examples section below.
| Name, shorthand | Default | Description |
--format , -f
| Format the output using the given Go template |
$ docker volume create myvolume
myvolume
Use the docker volume inspect comment to inspect the configuration of the volume:
$ docker volume inspect myvolume
The output is in JSON format, for example:
[
{
"CreatedAt": "2020-04-19T11:00:21Z",
"Driver": "local",
"Labels": {},
"Mountpoint": "/var/lib/docker/volumes/8140a838303144125b4f54653b47ede0486282c623c3551fbc7f390cdc3e9cf5/_data",
"Name": "myvolume",
"Options": {},
"Scope": "local"
}
]
Use the --format flag to format the output using a Go template, for example, to print the Mountpoint property:
$ docker volume inspect --format '{{ .Mountpoint }}' myvolume
/var/lib/docker/volumes/myvolume/_data
| Command | Description |
|---|---|
| docker volume | Manage volumes |
| Command | Description |
| docker volume create | Create a volume |
| docker volume inspect | Display detailed information on one or more volumes |
| docker volume ls | List volumes |
| docker volume prune | Remove all unused local volumes |
| docker volume rm | Remove one or more volumes |
© 2019 Docker, Inc.
Licensed under the Apache License, Version 2.0.
Docker and the Docker logo are trademarks or registered trademarks of Docker, Inc. in the United States and/or other countries.
Docker, Inc. and other parties may also have trademark rights in other terms used herein.
https://docs.docker.com/engine/reference/commandline/volume_inspect/