summaryrefslogtreecommitdiff
path: root/devdocs/docker/engine%2Freference%2Fcommandline%2Fvolume_inspect%2Findex.html
blob: 78871751f7843a4f695685b4b2e0cdada96b4b07 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<h1>docker volume inspect</h1>  <p><br></p> <p>Display detailed information on one or more volumes</p> <h2 id="usage">Usage</h2> <div class="highlight"><pre class="highlight" data-language="">$ docker volume inspect [OPTIONS] VOLUME [VOLUME...]
</pre></div> <p>Refer to the <a href="#options">options section</a> for an overview of available <a href="#options"><code class="language-plaintext highlighter-rouge">OPTIONS</code></a> for this command.</p> <h2 id="description">Description</h2> <p name="extended-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 <a href="https://golang.org/pkg/text/template/">text/template</a> package describes all the details of the format.</p> <p>For example uses of this command, refer to the <a href="#examples">examples section</a> below.</p> <h2 id="options">Options</h2> <table> <thead> <tr> <td>Name, shorthand</td> <td>Default</td> <td>Description</td> </tr> </thead> <tbody> <tr> <td>
<code class="language-plaintext highlighter-rouge">--format</code> , <code class="language-plaintext highlighter-rouge">-f</code>
</td> <td></td> <td>Format the output using the given Go template</td> </tr>  </tbody> </table>  <h2 id="examples">Examples</h2> <div class="highlight"><pre class="highlight" data-language="">$ docker volume create myvolume

myvolume
</pre></div> <p>Use the <code class="language-plaintext highlighter-rouge">docker volume inspect</code> comment to inspect the configuration of the volume:</p> <div class="highlight"><pre class="highlight" data-language="">$ docker volume inspect myvolume
</pre></div> <p>The output is in JSON format, for example:</p> <div class="highlight"><pre class="highlight" data-language="">[
  {
    "CreatedAt": "2020-04-19T11:00:21Z",
    "Driver": "local",
    "Labels": {},
    "Mountpoint": "/var/lib/docker/volumes/8140a838303144125b4f54653b47ede0486282c623c3551fbc7f390cdc3e9cf5/_data",
    "Name": "myvolume",
    "Options": {},
    "Scope": "local"
  }
]
</pre></div> <p>Use the <code class="language-plaintext highlighter-rouge">--format</code> flag to format the output using a Go template, for example, to print the <code class="language-plaintext highlighter-rouge">Mountpoint</code> property:</p> <div class="highlight"><pre class="highlight" data-language="">$ docker volume inspect --format '{{ .Mountpoint }}' myvolume

/var/lib/docker/volumes/myvolume/_data
</pre></div> <h2 id="parent-command">Parent command</h2> <table> <thead> <tr> <th style="text-align: left">Command</th> <th style="text-align: left">Description</th> </tr> </thead> <tbody> <tr> <td style="text-align: left"><a href="../volume/index">docker volume</a></td> <td style="text-align: left">Manage volumes</td> </tr> </tbody> </table> <h2 id="related-commands">Related commands</h2> <table> <thead> <tr> <td>Command</td> <td>Description</td> </tr> </thead> <tbody> <tr> <td><a href="../volume_create/index">docker volume create</a></td> <td>Create a volume</td> </tr> <tr> <td><a href="index">docker volume inspect</a></td> <td>Display detailed information on one or more volumes</td> </tr> <tr> <td><a href="../volume_ls/index">docker volume ls</a></td> <td>List volumes</td> </tr> <tr> <td><a href="../volume_prune/index">docker volume prune</a></td> <td>Remove all unused local volumes</td> </tr> <tr> <td><a href="../volume_rm/index">docker volume rm</a></td> <td>Remove one or more volumes</td> </tr> </tbody> </table> <div class="_attribution">
  <p class="_attribution-p">
    &copy; 2019 Docker, Inc.<br>Licensed under the Apache License, Version 2.0.<br>Docker and the Docker logo are trademarks or registered trademarks of Docker, Inc. in the United States and/or other countries.<br>Docker, Inc. and other parties may also have trademark rights in other terms used herein.<br>
    <a href="https://docs.docker.com/engine/reference/commandline/volume_inspect/" class="_attribution-link">https://docs.docker.com/engine/reference/commandline/volume_inspect/</a>
  </p>
</div>