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