1podman-container-inspect(1)()                    podman-container-inspect(1)()
2
3
4

NAME

6       podman-container-inspect - Display a container's configuration
7
8

SYNOPSIS

10       podman container inspect [options] container [container ...]
11
12

DESCRIPTION

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

OPTIONS

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.)
35
36
37   --size, -s
38       In  addition  to normal output, display the total file size if the type
39       is a container.
40
41

EXAMPLE

43              $ podman container inspect foobar
44              [
45                  {
46                      "Id": "99f66530fe9c7249f7cf29f78e8661669d5831cbe4ee80ea757d5e922dd6a8a6",
47                      "Created": "2021-09-16T06:09:08.936623325-04:00",
48                      "Path": "echo",
49                      "Args": [
50                          "hi"
51                      ],
52                      "State": {
53                          "OciVersion": "1.0.2-dev",
54                          "Status": "exited",
55                          "Running": false,
56                          "Paused": false,
57                          "Restarting": false,
58                          "OOMKilled": false,
59                          "Dead": false,
60                          "Pid": 0,
61                          "ExitCode": 0,
62                          "Error": "",
63                          "StartedAt": "2021-09-16T06:09:09.033564436-04:00",
64                          "FinishedAt": "2021-09-16T06:09:09.036184314-04:00",
65                          "Healthcheck": {
66                              "Status": "",
67                              "FailingStreak": 0,
68                              "Log": null
69                          }
70                      },
71                      "Image": "14119a10abf4669e8cdbdff324a9f9605d99697215a0d21c360fe8dfa8471bab",
72                      "ImageName": "docker.io/library/alpine:latest",
73                      "Rootfs": "",
74                      "Pod": "",
75                      "ResolvConfPath": "/run/user/3267/containers/overlay-containers/99f66530fe9c7249f7cf29f78e8661669d5831cbe4ee80ea757d5e922dd6a8a6/userdata/resolv.conf",
76                      "HostnamePath": "/run/user/3267/containers/overlay-containers/99f66530fe9c7249f7cf29f78e8661669d5831cbe4ee80ea757d5e922dd6a8a6/userdata/hostname",
77                      "HostsPath": "/run/user/3267/containers/overlay-containers/99f66530fe9c7249f7cf29f78e8661669d5831cbe4ee80ea757d5e922dd6a8a6/userdata/hosts",
78                      "StaticDir": "/home/dwalsh/.local/share/containers/storage/overlay-containers/99f66530fe9c7249f7cf29f78e8661669d5831cbe4ee80ea757d5e922dd6a8a6/userdata",
79                      "OCIConfigPath": "/home/dwalsh/.local/share/containers/storage/overlay-containers/99f66530fe9c7249f7cf29f78e8661669d5831cbe4ee80ea757d5e922dd6a8a6/userdata/config.json",
80                      "OCIRuntime": "crun",
81                      "ConmonPidFile": "/run/user/3267/containers/overlay-containers/99f66530fe9c7249f7cf29f78e8661669d5831cbe4ee80ea757d5e922dd6a8a6/userdata/conmon.pid",
82                      "PidFile": "/run/user/3267/containers/overlay-containers/99f66530fe9c7249f7cf29f78e8661669d5831cbe4ee80ea757d5e922dd6a8a6/userdata/pidfile",
83                      "Name": "foobar",
84                      "RestartCount": 0,
85                      "Driver": "overlay",
86                      "MountLabel": "system_u:object_r:container_file_t:s0:c25,c695",
87                      "ProcessLabel": "system_u:system_r:container_t:s0:c25,c695",
88                      "AppArmorProfile": "",
89                      "EffectiveCaps": [
90                          "CAP_CHOWN",
91                          "CAP_DAC_OVERRIDE",
92                          "CAP_FOWNER",
93                          "CAP_FSETID",
94                          "CAP_KILL",
95                          "CAP_NET_BIND_SERVICE",
96                          "CAP_SETFCAP",
97                          "CAP_SETGID",
98                          "CAP_SETPCAP",
99                          "CAP_SETUID",
100                          "CAP_SYS_CHROOT"
101                      ],
102                      "BoundingCaps": [
103                          "CAP_CHOWN",
104                          "CAP_DAC_OVERRIDE",
105                          "CAP_FOWNER",
106                          "CAP_FSETID",
107                          "CAP_KILL",
108                          "CAP_NET_BIND_SERVICE",
109                          "CAP_SETFCAP",
110                          "CAP_SETGID",
111                          "CAP_SETPCAP",
112                          "CAP_SETUID",
113                          "CAP_SYS_CHROOT"
114                      ],
115                      "ExecIDs": [],
116                      "GraphDriver": {
117                          "Name": "overlay",
118                          "Data": {
119                              "LowerDir": "/home/dwalsh/.local/share/containers/storage/overlay/e2eb06d8af8218cfec8210147357a68b7e13f7c485b991c288c2d01dc228bb68/diff",
120                              "UpperDir": "/home/dwalsh/.local/share/containers/storage/overlay/8f3d70434a3db17410ec4710caf4f251f3e4ed0a96a08124e4b3d4af0a0ea300/diff",
121                              "WorkDir": "/home/dwalsh/.local/share/containers/storage/overlay/8f3d70434a3db17410ec4710caf4f251f3e4ed0a96a08124e4b3d4af0a0ea300/work"
122                          }
123                      },
124                      "Mounts": [],
125                      "Dependencies": [],
126                      "NetworkSettings": {
127                          "EndpointID": "",
128                          "Gateway": "",
129                          "IPAddress": "",
130                          "IPPrefixLen": 0,
131                          "IPv6Gateway": "",
132                          "GlobalIPv6Address": "",
133                          "GlobalIPv6PrefixLen": 0,
134                          "MacAddress": "",
135                          "Bridge": "",
136                          "SandboxID": "",
137                          "HairpinMode": false,
138                          "LinkLocalIPv6Address": "",
139                          "LinkLocalIPv6PrefixLen": 0,
140                          "Ports": {},
141                          "SandboxKey": ""
142                      },
143                      "ExitCommand": [
144                          "/usr/bin/podman",
145                          "--root",
146                          "/home/dwalsh/.local/share/containers/storage",
147                          "--runroot",
148                          "/run/user/3267/containers",
149                          "--log-level",
150                          "warning",
151                          "--cgroup-manager",
152                          "systemd",
153                          "--tmpdir",
154                          "/run/user/3267/libpod/tmp",
155                          "--runtime",
156                          "crun",
157                          "--storage-driver",
158                          "overlay",
159                          "--events-backend",
160                          "journald",
161                          "container",
162                          "cleanup",
163                          "99f66530fe9c7249f7cf29f78e8661669d5831cbe4ee80ea757d5e922dd6a8a6"
164                      ],
165                      "Namespace": "",
166                      "IsInfra": false,
167                      "Config": {
168                          "Hostname": "99f66530fe9c",
169                          "Domainname": "",
170                          "User": "",
171                          "AttachStdin": false,
172                          "AttachStdout": false,
173                          "AttachStderr": false,
174                          "Tty": false,
175                          "OpenStdin": false,
176                          "StdinOnce": false,
177                          "Env": [
178                              "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
179                              "TERM=xterm",
180                              "container=podman",
181                              "HOME=/root",
182                              "HOSTNAME=99f66530fe9c"
183                          ],
184                          "Cmd": [
185                              "echo",
186                              "hi"
187                          ],
188                          "Image": "docker.io/library/alpine:latest",
189                          "Volumes": null,
190                          "WorkingDir": "/",
191                          "Entrypoint": "",
192                          "OnBuild": null,
193                          "Labels": null,
194                          "Annotations": {
195                              "io.container.manager": "libpod",
196                              "io.kubernetes.cri-o.Created": "2021-09-16T06:09:08.936623325-04:00",
197                              "io.kubernetes.cri-o.TTY": "false",
198                              "io.podman.annotations.autoremove": "FALSE",
199                              "io.podman.annotations.init": "FALSE",
200                              "io.podman.annotations.privileged": "FALSE",
201                              "io.podman.annotations.publish-all": "FALSE",
202                              "org.opencontainers.image.stopSignal": "15"
203                          },
204                          "StopSignal": 15,
205                          "CreateCommand": [
206                              "podman",
207                              "run",
208                              "--name",
209                              "foobar",
210                              "alpine",
211                              "echo",
212                              "hi"
213                          ],
214                          "Timezone": "local",
215                          "Umask": "0022",
216                          "Timeout": 0,
217                          "StopTimeout": 10
218                      },
219                      "HostConfig": {
220                          "Binds": [],
221                          "CgroupManager": "systemd",
222                          "CgroupMode": "private",
223                          "ContainerIDFile": "",
224                          "LogConfig": {
225                              "Type": "journald",
226                              "Config": null,
227                              "Path": "",
228                              "Tag": "",
229                              "Size": "0B"
230                          },
231                          "NetworkMode": "slirp4netns",
232                          "PortBindings": {},
233                          "RestartPolicy": {
234                              "Name": "",
235                              "MaximumRetryCount": 0
236                          },
237                          "AutoRemove": false,
238                          "VolumeDriver": "",
239                          "VolumesFrom": null,
240                          "CapAdd": [],
241                          "CapDrop": [
242                              "CAP_AUDIT_WRITE",
243                              "CAP_MKNOD",
244                              "CAP_NET_RAW"
245                          ],
246                          "Dns": [],
247                          "DnsOptions": [],
248                          "DnsSearch": [],
249                          "ExtraHosts": [],
250                          "GroupAdd": [],
251                          "IpcMode": "private",
252                          "Cgroup": "",
253                          "Cgroups": "default",
254                          "Links": null,
255                          "OomScoreAdj": 0,
256                          "PidMode": "private",
257                          "Privileged": false,
258                          "PublishAllPorts": false,
259                          "ReadonlyRootfs": false,
260                          "SecurityOpt": [],
261                          "Tmpfs": {},
262                          "UTSMode": "private",
263                          "UsernsMode": "",
264                          "ShmSize": 65536000,
265                          "Runtime": "oci",
266                          "ConsoleSize": [
267                              0,
268                              0
269                          ],
270                          "Isolation": "",
271                          "CpuShares": 0,
272                          "Memory": 0,
273                          "NanoCpus": 0,
274                          "CgroupParent": "user.slice",
275                          "BlkioWeight": 0,
276                          "BlkioWeightDevice": null,
277                          "BlkioDeviceReadBps": null,
278                          "BlkioDeviceWriteBps": null,
279                          "BlkioDeviceReadIOps": null,
280                          "BlkioDeviceWriteIOps": null,
281                          "CpuPeriod": 0,
282                          "CpuQuota": 0,
283                          "CpuRealtimePeriod": 0,
284                          "CpuRealtimeRuntime": 0,
285                          "CpusetCpus": "",
286                          "CpusetMems": "",
287                          "Devices": [],
288                          "DiskQuota": 0,
289                          "KernelMemory": 0,
290                          "MemoryReservation": 0,
291                          "MemorySwap": 0,
292                          "MemorySwappiness": 0,
293                          "OomKillDisable": false,
294                          "PidsLimit": 2048,
295                          "Ulimits": [],
296                          "CpuCount": 0,
297                          "CpuPercent": 0,
298                          "IOMaximumIOps": 0,
299                          "IOMaximumBandwidth": 0,
300                          "CgroupConf": null
301                      }
302                  }
303              ]
304
305
306
307              $ podman container inspect nervous_fermi --format "{{.ImageName}}"
308              registry.access.redhat.com/ubi8:latest
309
310
311
312              $ podman container inspect foobar --format "{{.GraphDriver.Name}}"
313              overlay
314
315
316
317              $ podman container inspect --latest --format {{.EffectiveCaps}}
318              [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]
319
320
321

SEE ALSO

323       podman(1),podman-container(1), podman-inspect(1)
324
325

HISTORY

327       Sep  2021,  Originally  compiled   by   Dan   Walsh   dwalsh@redhat.com
328       ⟨mailto:dwalsh@redhat.com⟩
329
330
331
332                                                 podman-container-inspect(1)()
Impressum