Files
docker-cli/docs/reference/commandline/volume_inspect.md
Sebastiaan van Stijn 96eb0888fa reference docs: fix broken links and markdown touch-ups
- fix various broken links
- fix incorrect anchors
- updated links for content that moved, so that no
  redirect to the new location is needed.
- touched-up Markdown;
  - re-format some JSON output
  - add blank line betweeen command and command output
  - format "note" blocks

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 8919c228bd)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-04-19 19:41:50 +02:00

1.6 KiB

title, description, keywords
title description keywords
volume inspect The volume inspect command description and usage volume, inspect

volume inspect

Usage:  docker volume inspect [OPTIONS] VOLUME [VOLUME...]

Display detailed information on one or more volumes

Options:
  -f, --format string   Format the output using the given Go template
      --help            Print usage

Description

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.

Examples

$ docker volume create

8140a838303144125b4f54653b47ede0486282c623c3551fbc7f390cdc3e9cf5

$ docker volume inspect 85bffb0677236974f93955d8ecc4df55ef5070117b0e53333cc1b443777be24d

[
  {
    "CreatedAt": "2020-04-19T11:00:21Z",
    "Driver": "local",
    "Labels": {},
    "Mountpoint": "/var/lib/docker/volumes/8140a838303144125b4f54653b47ede0486282c623c3551fbc7f390cdc3e9cf5/_data",
    "Name": "8140a838303144125b4f54653b47ede0486282c623c3551fbc7f390cdc3e9cf5",
    "Options": {},
    "Scope": "local"
  }
]

$ docker volume inspect --format '{{ .Mountpoint }}' 8140a838303144125b4f54653b47ede0486282c623c3551fbc7f390cdc3e9cf5

/var/lib/docker/volumes/8140a838303144125b4f54653b47ede0486282c623c3551fbc7f390cdc3e9cf5/_data