1podman-container-inspect(1)() podman-container-inspect(1)()
2
3
4
6 podman-container-inspect - Display a container's configuration
7
8
10 podman container inspect [options] container [container ...]
11
12
14 This displays the low-level information on containers identified by
15 name or ID. By default, this will render all results in a JSON array.
16 If a format is specified, the given template will be executed for each
17 result.
18
19
21 --format, -f=format
22 Format the output using the given Go template. The keys of the re‐
23 turned JSON can be used as the values for the --format flag (see exam‐
24 ples below).
25
26
27 --latest, -l
28 Instead of providing the container name or ID, use the last created
29 container. If you use methods other than Podman to run containers such
30 as CRI-O, the last started container could be from either of those
31 methods.
32
33
34 (This option is not available with the remote Podman client, including
35 Mac and Windows (excluding WSL2) machines.)
36
37
38 --size, -s
39 In addition to normal output, display the total file size if the type
40 is a container.
41
42
44 $ podman container inspect foobar
45 [
46 {
47 "Id": "99f66530fe9c7249f7cf29f78e8661669d5831cbe4ee80ea757d5e922dd6a8a6",
48 "Created": "2021-09-16T06:09:08.936623325-04:00",
49 "Path": "echo",
50 "Args": [
51 "hi"
52 ],
53 "State": {
54 "OciVersion": "1.0.2-dev",
55 "Status": "exited",
56 "Running": false,
57 "Paused": false,
58 "Restarting": false,
59 "OOMKilled": false,
60 "Dead": false,
61 "Pid": 0,
62 "ExitCode": 0,
63 "Error": "",
64 "StartedAt": "2021-09-16T06:09:09.033564436-04:00",
65 "FinishedAt": "2021-09-16T06:09:09.036184314-04:00",
66 "Healthcheck": {
67 "Status": "",
68 "FailingStreak": 0,
69 "Log": null
70 }
71 },
72 "Image": "14119a10abf4669e8cdbdff324a9f9605d99697215a0d21c360fe8dfa8471bab",
73 "ImageName": "docker.io/library/alpine:latest",
74 "Rootfs": "",
75 "Pod": "",
76 "ResolvConfPath": "/run/user/3267/containers/overlay-containers/99f66530fe9c7249f7cf29f78e8661669d5831cbe4ee80ea757d5e922dd6a8a6/userdata/resolv.conf",
77 "HostnamePath": "/run/user/3267/containers/overlay-containers/99f66530fe9c7249f7cf29f78e8661669d5831cbe4ee80ea757d5e922dd6a8a6/userdata/hostname",
78 "HostsPath": "/run/user/3267/containers/overlay-containers/99f66530fe9c7249f7cf29f78e8661669d5831cbe4ee80ea757d5e922dd6a8a6/userdata/hosts",
79 "StaticDir": "/home/dwalsh/.local/share/containers/storage/overlay-containers/99f66530fe9c7249f7cf29f78e8661669d5831cbe4ee80ea757d5e922dd6a8a6/userdata",
80 "OCIConfigPath": "/home/dwalsh/.local/share/containers/storage/overlay-containers/99f66530fe9c7249f7cf29f78e8661669d5831cbe4ee80ea757d5e922dd6a8a6/userdata/config.json",
81 "OCIRuntime": "crun",
82 "ConmonPidFile": "/run/user/3267/containers/overlay-containers/99f66530fe9c7249f7cf29f78e8661669d5831cbe4ee80ea757d5e922dd6a8a6/userdata/conmon.pid",
83 "PidFile": "/run/user/3267/containers/overlay-containers/99f66530fe9c7249f7cf29f78e8661669d5831cbe4ee80ea757d5e922dd6a8a6/userdata/pidfile",
84 "Name": "foobar",
85 "RestartCount": 0,
86 "Driver": "overlay",
87 "MountLabel": "system_u:object_r:container_file_t:s0:c25,c695",
88 "ProcessLabel": "system_u:system_r:container_t:s0:c25,c695",
89 "AppArmorProfile": "",
90 "EffectiveCaps": [
91 "CAP_CHOWN",
92 "CAP_DAC_OVERRIDE",
93 "CAP_FOWNER",
94 "CAP_FSETID",
95 "CAP_KILL",
96 "CAP_NET_BIND_SERVICE",
97 "CAP_SETFCAP",
98 "CAP_SETGID",
99 "CAP_SETPCAP",
100 "CAP_SETUID",
101 "CAP_SYS_CHROOT"
102 ],
103 "BoundingCaps": [
104 "CAP_CHOWN",
105 "CAP_DAC_OVERRIDE",
106 "CAP_FOWNER",
107 "CAP_FSETID",
108 "CAP_KILL",
109 "CAP_NET_BIND_SERVICE",
110 "CAP_SETFCAP",
111 "CAP_SETGID",
112 "CAP_SETPCAP",
113 "CAP_SETUID",
114 "CAP_SYS_CHROOT"
115 ],
116 "ExecIDs": [],
117 "GraphDriver": {
118 "Name": "overlay",
119 "Data": {
120 "LowerDir": "/home/dwalsh/.local/share/containers/storage/overlay/e2eb06d8af8218cfec8210147357a68b7e13f7c485b991c288c2d01dc228bb68/diff",
121 "UpperDir": "/home/dwalsh/.local/share/containers/storage/overlay/8f3d70434a3db17410ec4710caf4f251f3e4ed0a96a08124e4b3d4af0a0ea300/diff",
122 "WorkDir": "/home/dwalsh/.local/share/containers/storage/overlay/8f3d70434a3db17410ec4710caf4f251f3e4ed0a96a08124e4b3d4af0a0ea300/work"
123 }
124 },
125 "Mounts": [],
126 "Dependencies": [],
127 "NetworkSettings": {
128 "EndpointID": "",
129 "Gateway": "",
130 "IPAddress": "",
131 "IPPrefixLen": 0,
132 "IPv6Gateway": "",
133 "GlobalIPv6Address": "",
134 "GlobalIPv6PrefixLen": 0,
135 "MacAddress": "",
136 "Bridge": "",
137 "SandboxID": "",
138 "HairpinMode": false,
139 "LinkLocalIPv6Address": "",
140 "LinkLocalIPv6PrefixLen": 0,
141 "Ports": {},
142 "SandboxKey": ""
143 },
144 "Namespace": "",
145 "IsInfra": false,
146 "Config": {
147 "Hostname": "99f66530fe9c",
148 "Domainname": "",
149 "User": "",
150 "AttachStdin": false,
151 "AttachStdout": false,
152 "AttachStderr": false,
153 "Tty": false,
154 "OpenStdin": false,
155 "StdinOnce": false,
156 "Env": [
157 "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
158 "TERM=xterm",
159 "container=podman",
160 "HOME=/root",
161 "HOSTNAME=99f66530fe9c"
162 ],
163 "Cmd": [
164 "echo",
165 "hi"
166 ],
167 "Image": "docker.io/library/alpine:latest",
168 "Volumes": null,
169 "WorkingDir": "/",
170 "Entrypoint": "",
171 "OnBuild": null,
172 "Labels": null,
173 "Annotations": {
174 "io.container.manager": "libpod",
175 "io.kubernetes.cri-o.Created": "2021-09-16T06:09:08.936623325-04:00",
176 "io.kubernetes.cri-o.TTY": "false",
177 "io.podman.annotations.autoremove": "FALSE",
178 "io.podman.annotations.init": "FALSE",
179 "io.podman.annotations.privileged": "FALSE",
180 "io.podman.annotations.publish-all": "FALSE",
181 "org.opencontainers.image.stopSignal": "15"
182 },
183 "StopSignal": 15,
184 "CreateCommand": [
185 "podman",
186 "run",
187 "--name",
188 "foobar",
189 "alpine",
190 "echo",
191 "hi"
192 ],
193 "Timezone": "local",
194 "Umask": "0022",
195 "Timeout": 0,
196 "StopTimeout": 10
197 },
198 "HostConfig": {
199 "Binds": [],
200 "CgroupManager": "systemd",
201 "CgroupMode": "private",
202 "ContainerIDFile": "",
203 "LogConfig": {
204 "Type": "journald",
205 "Config": null,
206 "Path": "",
207 "Tag": "",
208 "Size": "0B"
209 },
210 "NetworkMode": "slirp4netns",
211 "PortBindings": {},
212 "RestartPolicy": {
213 "Name": "",
214 "MaximumRetryCount": 0
215 },
216 "AutoRemove": false,
217 "VolumeDriver": "",
218 "VolumesFrom": null,
219 "CapAdd": [],
220 "CapDrop": [
221 "CAP_AUDIT_WRITE",
222 "CAP_MKNOD",
223 "CAP_NET_RAW"
224 ],
225 "Dns": [],
226 "DnsOptions": [],
227 "DnsSearch": [],
228 "ExtraHosts": [],
229 "GroupAdd": [],
230 "IpcMode": "shareable",
231 "Cgroup": "",
232 "Cgroups": "default",
233 "Links": null,
234 "OomScoreAdj": 0,
235 "PidMode": "private",
236 "Privileged": false,
237 "PublishAllPorts": false,
238 "ReadonlyRootfs": false,
239 "SecurityOpt": [],
240 "Tmpfs": {},
241 "UTSMode": "private",
242 "UsernsMode": "",
243 "ShmSize": 65536000,
244 "Runtime": "oci",
245 "ConsoleSize": [
246 0,
247 0
248 ],
249 "Isolation": "",
250 "CpuShares": 0,
251 "Memory": 0,
252 "NanoCpus": 0,
253 "CgroupParent": "user.slice",
254 "BlkioWeight": 0,
255 "BlkioWeightDevice": null,
256 "BlkioDeviceReadBps": null,
257 "BlkioDeviceWriteBps": null,
258 "BlkioDeviceReadIOps": null,
259 "BlkioDeviceWriteIOps": null,
260 "CpuPeriod": 0,
261 "CpuQuota": 0,
262 "CpuRealtimePeriod": 0,
263 "CpuRealtimeRuntime": 0,
264 "CpusetCpus": "",
265 "CpusetMems": "",
266 "Devices": [],
267 "DiskQuota": 0,
268 "KernelMemory": 0,
269 "MemoryReservation": 0,
270 "MemorySwap": 0,
271 "MemorySwappiness": 0,
272 "OomKillDisable": false,
273 "PidsLimit": 2048,
274 "Ulimits": [],
275 "CpuCount": 0,
276 "CpuPercent": 0,
277 "IOMaximumIOps": 0,
278 "IOMaximumBandwidth": 0,
279 "CgroupConf": null
280 }
281 }
282 ]
283
284
285
286 $ podman container inspect nervous_fermi --format "{{.ImageName}}"
287 registry.access.redhat.com/ubi8:latest
288
289
290
291 $ podman container inspect foobar --format "{{.GraphDriver.Name}}"
292 overlay
293
294
295
296 $ podman container inspect --latest --format {{.EffectiveCaps}}
297 [CAP_CHOWN CAP_DAC_OVERRIDE CAP_FOWNER CAP_FSETID CAP_KILL CAP_NET_BIND_SERVICE CAP_SETFCAP CAP_SETGID CAP_SETPCAP CAP_SETUID CAP_SYS_CHROOT]
298
299
300
302 podman(1), podman-container(1), podman-inspect(1)
303
304
306 Sep 2021, Originally compiled by Dan Walsh dwalsh@redhat.com
307 ⟨mailto:dwalsh@redhat.com⟩
308
309
310
311 podman-container-inspect(1)()