mirror of
https://github.com/containers/podman.git
synced 2025-08-06 03:19:52 +08:00
Add format to podman volume inspect
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
@ -24,6 +24,27 @@ Inspect all volumes.
|
||||
|
||||
Format volume output using Go template
|
||||
|
||||
Valid placeholders for the Go template are listed below:
|
||||
|
||||
| **Placeholder** | **Description** |
|
||||
| ------------------- | ------------------------------------------------------ |
|
||||
| .Anonymous | Indicates whether volume is anonymous |
|
||||
| .CreatedAt | Volume creation time |
|
||||
| .Driver | Volume driver |
|
||||
| .GID | GID the volume was created with |
|
||||
| .Labels | Label information associated with the volume |
|
||||
| .MountCount | Number of times the volume is mounted |
|
||||
| .Mountpoint | Source of volume mount point |
|
||||
| .Name | Volume name |
|
||||
| .NeedsChown | Indicates volume needs to be chowned on first use |
|
||||
| .NeedsCopyUp | Indicates volume needs dest data copied up on first use|
|
||||
| .Options | Volume options |
|
||||
| .Scope | Volume scope |
|
||||
| .Status | Status of the volume |
|
||||
| .StorageID | StorageID of the volume |
|
||||
| .Timeout | Timeout of the volume |
|
||||
| .UID | UID the volume was created with |
|
||||
|
||||
#### **--help**
|
||||
|
||||
Print usage statement
|
||||
@ -33,10 +54,41 @@ Print usage statement
|
||||
|
||||
```
|
||||
$ podman volume inspect myvol
|
||||
|
||||
[
|
||||
{
|
||||
"Name": "myvol",
|
||||
"Driver": "local",
|
||||
"Mountpoint": "/home/myusername/.local/share/containers/storage/volumes/myvol/_data",
|
||||
"CreatedAt": "2023-03-13T16:26:48.423069028-04:00",
|
||||
"Labels": {},
|
||||
"Scope": "local",
|
||||
"Options": {},
|
||||
"MountCount": 0,
|
||||
"NeedsCopyUp": true,
|
||||
"NeedsChown": true
|
||||
}
|
||||
]
|
||||
```
|
||||
$ podman volume inspect --all
|
||||
[
|
||||
{
|
||||
"Name": "myvol",
|
||||
"Driver": "local",
|
||||
"Mountpoint": "/home/myusername/.local/share/containers/storage/volumes/myvol/_data",
|
||||
"CreatedAt": "2023-03-13T16:26:48.423069028-04:00",
|
||||
"Labels": {},
|
||||
"Scope": "local",
|
||||
"Options": {},
|
||||
"MountCount": 0,
|
||||
"NeedsCopyUp": true,
|
||||
"NeedsChown": true
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
```
|
||||
$ podman volume inspect --format "{{.Driver}} {{.Scope}}" myvol
|
||||
local local
|
||||
```
|
||||
|
||||
## SEE ALSO
|
||||
|
Reference in New Issue
Block a user