github.com/khulnasoft/cli@v0.0.0-20240402070845-01bcad7beefa/docs/reference/commandline/volume_inspect.md (about)

     1  # volume inspect
     2  
     3  <!---MARKER_GEN_START-->
     4  Display detailed information on one or more volumes
     5  
     6  ### Options
     7  
     8  | Name                                   | Type     | Default | Description                                                                                                                                                                                                                                                        |
     9  |:---------------------------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
    10  | [`-f`](#format), [`--format`](#format) | `string` |         | Format output using a custom template:<br>'json':             Print in JSON format<br>'TEMPLATE':         Print output using the given Go template.<br>Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates |
    11  
    12  
    13  <!---MARKER_GEN_END-->
    14  
    15  ## Description
    16  
    17  Returns information about a volume. By default, this command renders all results
    18  in a JSON array. You can specify an alternate format to execute a
    19  given template for each result. Go's
    20  [text/template](https://pkg.go.dev/text/template) package describes all the
    21  details of the format.
    22  
    23  ## Examples
    24  
    25  ```console
    26  $ docker volume create myvolume
    27  
    28  myvolume
    29  ```
    30  
    31  Use the `docker volume inspect` comment to inspect the configuration of the volume:
    32  
    33  ```console
    34  $ docker volume inspect myvolume
    35  ```
    36  
    37  The output is in JSON format, for example:
    38  
    39  ```json
    40  [
    41    {
    42      "CreatedAt": "2020-04-19T11:00:21Z",
    43      "Driver": "local",
    44      "Labels": {},
    45      "Mountpoint": "/var/lib/docker/volumes/8140a838303144125b4f54653b47ede0486282c623c3551fbc7f390cdc3e9cf5/_data",
    46      "Name": "myvolume",
    47      "Options": {},
    48      "Scope": "local"
    49    }
    50  ]
    51  ```
    52  
    53  ### <a name="format"></a> Format the output (--format)
    54  
    55  Use the `--format` flag to format the output using a Go template, for example,
    56  to print the `Mountpoint` property:
    57  
    58  ```console
    59  $ docker volume inspect --format '{{ .Mountpoint }}' myvolume
    60  
    61  /var/lib/docker/volumes/myvolume/_data
    62  ```
    63  
    64  ## Related commands
    65  
    66  * [volume create](volume_create.md)
    67  * [volume ls](volume_ls.md)
    68  * [volume rm](volume_rm.md)
    69  * [volume prune](volume_prune.md)
    70  * [Understand Data Volumes](https://docs.docker.com/storage/volumes/)