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
45 returned JSON can be used as the values for the --format flag (see
46 examples 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
58
59
60 The latest option is not supported on the remote client or when invoked
61 as podman image inspect.
62
63
64 --size, -s
65 In addition to normal output, display the total file size if the type
66 is a container.
67
68
70 # podman inspect fedora
71 [
72 {
73 "Id": "f0858ad3febdf45bb2e5501cb459affffacef081f79eaa436085c3b6d9bd46ca",
74 "Digest": "sha256:d4f7df6b691d61af6cee7328f82f1d8afdef63bc38f58516858ae3045083924a",
75 "RepoTags": [
76 "docker.io/library/fedora:latest"
77 ],
78 "RepoDigests": [
79 "docker.io/library/fedora@sha256:8fa60b88e2a7eac8460b9c0104b877f1aa0cea7fbc03c701b7e545dacccfb433",
80 "docker.io/library/fedora@sha256:d4f7df6b691d61af6cee7328f82f1d8afdef63bc38f58516858ae3045083924a"
81 ],
82 "Parent": "",
83 "Comment": "",
84 "Created": "2019-10-29T03:23:37.695123423Z",
85 "Config": {
86 "Env": [
87 "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
88 "DISTTAG=f31-updates-candidatecontainer",
89 "FGC=f31-updates-candidate",
90 "FBR=f31-updates-candidate"
91 ],
92 "Cmd": [
93 "/bin/bash"
94 ],
95 "Labels": {
96 "maintainer": "Clement Verna \u003ccverna@fedoraproject.org\u003e"
97 }
98 },
99 "Version": "18.06.1-ce",
100 "Author": "",
101 "Architecture": "amd64",
102 "Os": "linux",
103 "Size": 201096840,
104 "VirtualSize": 201096840,
105 "GraphDriver": {
106 "Name": "overlay",
107 "Data": {
108 "UpperDir": "/home/user/.local/share/containers/storage/overlay/2ae3cee18c8ef9e0d448649747dab81c4f1ca2714a8c4550eff49574cab262c9/diff",
109 "WorkDir": "/home/user/.local/share/containers/storage/overlay/2ae3cee18c8ef9e0d448649747dab81c4f1ca2714a8c4550eff49574cab262c9/work"
110 }
111 },
112 "RootFS": {
113 "Type": "layers",
114 "Layers": [
115 "sha256:2ae3cee18c8ef9e0d448649747dab81c4f1ca2714a8c4550eff49574cab262c9"
116 ]
117 },
118 "Labels": {
119 "maintainer": "Clement Verna \u003ccverna@fedoraproject.org\u003e"
120 },
121 "Annotations": {},
122 "ManifestType": "application/vnd.docker.distribution.manifest.v2+json",
123 "User": "",
124 "History": [
125 {
126 "created": "2019-01-16T21:21:55.569693599Z",
127 "created_by": "/bin/sh -c #(nop) LABEL maintainer=Clement Verna \u003ccverna@fedoraproject.org\u003e",
128 "empty_layer": true
129 },
130 {
131 "created": "2019-09-27T21:21:07.784469821Z",
132 "created_by": "/bin/sh -c #(nop) ENV DISTTAG=f31-updates-candidatecontainer FGC=f31-updates-candidate FBR=f31-updates-candidate",
133 "empty_layer": true
134 },
135 {
136 "created": "2019-10-29T03:23:37.355187998Z",
137 "created_by": "/bin/sh -c #(nop) ADD file:298f828afc880ccde9205fc4418435d5e696ad165e283f0530d0b1a74326d6dc in / "
138 },
139 {
140 "created": "2019-10-29T03:23:37.695123423Z",
141 "created_by": "/bin/sh -c #(nop) CMD [\"/bin/bash\"]",
142 "empty_layer": true
143 }
144 ],
145 "NamesHistory": []
146 }
147 ]
148
149
150
151 # podman inspect a04 --format "{{.ImageName}}"
152 fedora
153
154
155
156 # podman inspect a04 --format "{{.GraphDriver.Name}}"
157 overlay
158
159
160
161 # podman image inspect --format "size: {{.Size}}" alpine
162 size: 4405240
163
164
165
166 podman container inspect --latest --format {{.EffectiveCaps}}
167 [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]
168
169
170
171 # podman inspect myPod --type pod --format "{{.Name}}"
172 myPod
173
174
175
176 # podman inspect myVolume --type volume --format "{{.Name}}"
177 myVolume
178
179
180
181 # podman inspect nyNetwork --type network --format "{{.name}}"
182 myNetwork
183
184
185
187 podman(1)
188
189
191 July 2017, Originally compiled by Dan Walsh dwalsh@redhat.com
192 ⟨mailto:dwalsh@redhat.com⟩
193
194
195
196 podman-inspect(1)()