github.com/containers/podman/v5@v5.1.0-rc1/docs/source/markdown/podman-inspect.1.md.in (about) 1 % podman-inspect 1 2 3 ## NAME 4 podman\-inspect - Display a container, image, volume, network, or pod's configuration 5 6 ## SYNOPSIS 7 **podman inspect** [*options*] *name* [...] 8 9 ## DESCRIPTION 10 11 This displays the low-level information on containers and images identified by name or ID. By default, this renders 12 all results in a JSON array. If the inspect type is all, the order of inspection is: containers, images, volumes, network, pods. 13 If a container has the same name as an image, then the container JSON is returned, and so on. 14 If a format is specified, the given template is executed for each result. 15 16 For more inspection options, see also 17 [podman-container-inspect(1)](podman-container-inspect.1.md), 18 [podman-image-inspect(1)](podman-image-inspect.1.md), 19 [podman-network-inspect(1)](podman-network-inspect.1.md), 20 [podman-pod-inspect(1)](podman-pod-inspect.1.md), and 21 [podman-volume-inspect(1)](podman-volume-inspect.1.md). 22 23 ## OPTIONS 24 25 #### **--format**, **-f**=*format* 26 27 Format the output using the given Go template. 28 The keys of the returned JSON can be used as the values for the --format flag (see examples below). 29 30 @@option latest 31 32 #### **--size**, **-s** 33 34 In addition to normal output, display the total file size if the type is a container. 35 36 #### **--type**, **-t**=*type* 37 38 Return JSON for the specified type. Type can be 'container', 'image', 'volume', 'network', 'pod', or 'all' (default: all) 39 (Only meaningful when invoked as *podman inspect*) 40 41 ## EXAMPLE 42 43 Inspect the fedora image: 44 ``` 45 # podman inspect fedora 46 [ 47 { 48 "Id": "f0858ad3febdf45bb2e5501cb459affffacef081f79eaa436085c3b6d9bd46ca", 49 "Digest": "sha256:d4f7df6b691d61af6cee7328f82f1d8afdef63bc38f58516858ae3045083924a", 50 "RepoTags": [ 51 "docker.io/library/fedora:latest" 52 ], 53 "RepoDigests": [ 54 "docker.io/library/fedora@sha256:8fa60b88e2a7eac8460b9c0104b877f1aa0cea7fbc03c701b7e545dacccfb433", 55 "docker.io/library/fedora@sha256:d4f7df6b691d61af6cee7328f82f1d8afdef63bc38f58516858ae3045083924a" 56 ], 57 "Parent": "", 58 "Comment": "", 59 "Created": "2019-10-29T03:23:37.695123423Z", 60 "Config": { 61 "Env": [ 62 "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", 63 "DISTTAG=f31-updates-candidatecontainer", 64 "FGC=f31-updates-candidate", 65 "FBR=f31-updates-candidate" 66 ], 67 "Cmd": [ 68 "/bin/bash" 69 ], 70 "Labels": { 71 "maintainer": "Clement Verna \u003ccverna@fedoraproject.org\u003e" 72 } 73 }, 74 "Version": "18.06.1-ce", 75 "Author": "", 76 "Architecture": "amd64", 77 "Os": "linux", 78 "Size": 201096840, 79 "VirtualSize": 201096840, 80 "GraphDriver": { 81 "Name": "overlay", 82 "Data": { 83 "UpperDir": "/home/user/.local/share/containers/storage/overlay/2ae3cee18c8ef9e0d448649747dab81c4f1ca2714a8c4550eff49574cab262c9/diff", 84 "WorkDir": "/home/user/.local/share/containers/storage/overlay/2ae3cee18c8ef9e0d448649747dab81c4f1ca2714a8c4550eff49574cab262c9/work" 85 } 86 }, 87 "RootFS": { 88 "Type": "layers", 89 "Layers": [ 90 "sha256:2ae3cee18c8ef9e0d448649747dab81c4f1ca2714a8c4550eff49574cab262c9" 91 ] 92 }, 93 "Labels": { 94 "maintainer": "Clement Verna \u003ccverna@fedoraproject.org\u003e" 95 }, 96 "Annotations": {}, 97 "ManifestType": "application/vnd.docker.distribution.manifest.v2+json", 98 "User": "", 99 "History": [ 100 { 101 "created": "2019-01-16T21:21:55.569693599Z", 102 "created_by": "/bin/sh -c #(nop) LABEL maintainer=Clement Verna \u003ccverna@fedoraproject.org\u003e", 103 "empty_layer": true 104 }, 105 { 106 "created": "2019-09-27T21:21:07.784469821Z", 107 "created_by": "/bin/sh -c #(nop) ENV DISTTAG=f31-updates-candidatecontainer FGC=f31-updates-candidate FBR=f31-updates-candidate", 108 "empty_layer": true 109 }, 110 { 111 "created": "2019-10-29T03:23:37.355187998Z", 112 "created_by": "/bin/sh -c #(nop) ADD file:298f828afc880ccde9205fc4418435d5e696ad165e283f0530d0b1a74326d6dc in / " 113 }, 114 { 115 "created": "2019-10-29T03:23:37.695123423Z", 116 "created_by": "/bin/sh -c #(nop) CMD [\"/bin/bash\"]", 117 "empty_layer": true 118 } 119 ], 120 "NamesHistory": [] 121 } 122 ] 123 ``` 124 125 Inspect the specified image with the `ImageName` format specifier: 126 ``` 127 # podman inspect a04 --format "{{.ImageName}}" 128 fedora 129 ``` 130 131 Inspect the specified image for `GraphDriver` format specifier: 132 ``` 133 # podman inspect a04 --format "{{.GraphDriver.Name}}" 134 overlay 135 ``` 136 137 Inspect the specified image for its `Size` format specifier: 138 ``` 139 # podman image inspect --format "size: {{.Size}}" alpine 140 size: 4405240 141 ``` 142 143 Inspect the latest container created for `EffectiveCaps` format specifier. (This option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines): 144 ``` 145 podman container inspect --latest --format {{.EffectiveCaps}} 146 [CAP_CHOWN CAP_DAC_OVERRIDE CAP_FSETID CAP_FOWNER CAP_SETGID CAP_SETUID CAP_SETFCAP CAP_SETPCAP CAP_NET_BIND_SERVICE CAP_KILL] 147 ``` 148 149 Inspect the specified pod for the `Name` format specifier: 150 ``` 151 # podman inspect myPod --type pod --format "{{.Name}}" 152 myPod 153 ``` 154 155 Inspect the specified volume for the `Name` format specifier: 156 ``` 157 # podman inspect myVolume --type volume --format "{{.Name}}" 158 myVolume 159 ``` 160 161 Inspect the specified network for the `Name` format specifier: 162 ``` 163 # podman inspect nyNetwork --type network --format "{{.name}}" 164 myNetwork 165 ``` 166 167 ## SEE ALSO 168 **[podman(1)](podman.1.md)**, **[podman-container-inspect(1)](podman-container-inspect.1.md)**, **[podman-image-inspect(1)](podman-image-inspect.1.md)**, **[podman-network-inspect(1)](podman-network-inspect.1.md)**, **[podman-pod-inspect(1)](podman-pod-inspect.1.md)**, **[podman-volume-inspect(1)](podman-volume-inspect.1.md)** 169 170 ## HISTORY 171 July 2017, Originally compiled by Dan Walsh <dwalsh@redhat.com>