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