1podman-container-inspect(1) General Commands Manualpodman-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 renders all results in a JSON array. If  a
16       format is specified, the given template is executed for each result.
17
18

OPTIONS

20   --format, -f=format
21       Format  the  output  using  the given Go template.  The keys of the re‐
22       turned JSON can be used as the values for the --format flag (see  exam‐
23       ples below).
24
25
26       Valid placeholders for the Go template are listed below:
27
28
29       ┌─────────────────────────┬───────────────────────────────┐
30Placeholder              Description                   
31       ├─────────────────────────┼───────────────────────────────┤
32.AppArmorProfile         AppArmor profile (string)     
33       ├─────────────────────────┼───────────────────────────────┤
34.Args                    │ Command-line arguments (array │
35       │                         │ of strings)                   │
36       ├─────────────────────────┼───────────────────────────────┤
37.BoundingCaps            │ Bounding capability set  (ar‐ │
38       │                         │ ray of strings)               │
39       ├─────────────────────────┼───────────────────────────────┤
40.Config ...              Structure with config info    
41       ├─────────────────────────┼───────────────────────────────┤
42.ConmonPidFile           │ Path  to file containing con‐ │
43       │                         │ mon pid (string)              │
44       ├─────────────────────────┼───────────────────────────────┤
45.Created                 │ Container    creation    time │
46       │                         │ (string, ISO3601)             │
47       ├─────────────────────────┼───────────────────────────────┤
48.Dependencies            │ Dependencies     (array    of │
49       │                         │ strings)                      │
50       ├─────────────────────────┼───────────────────────────────┤
51.Driver                  Storage driver (string)       
52       ├─────────────────────────┼───────────────────────────────┤
53.EffectiveCaps           │ Effective capability set (ar‐ │
54       │                         │ ray of strings)               │
55       ├─────────────────────────┼───────────────────────────────┤
56.ExecIDs                 Exec IDs (array of strings)   
57       ├─────────────────────────┼───────────────────────────────┤
58.GraphDriver ...         │ Further   details   of  graph │
59       │                         │ driver (struct)               │
60       ├─────────────────────────┼───────────────────────────────┤
61.HostConfig ...          Host config details (struct)  
62       ├─────────────────────────┼───────────────────────────────┤
63.HostnamePath            │ Path to file containing host‐ │
64       │                         │ name (string)                 │
65       ├─────────────────────────┼───────────────────────────────┤
66.HostsPath               │ Path  to container /etc/hosts │
67       │                         │ file (string)                 │
68       ├─────────────────────────┼───────────────────────────────┤
69.ID                      │ Container  ID  (full  64-char │
70       │                         │ hash)                         │
71       ├─────────────────────────┼───────────────────────────────┤
72.Image                   │ Container  image  ID (64-char │
73       │                         │ hash)                         │
74       ├─────────────────────────┼───────────────────────────────┤
75.ImageDigest             │ Container    image     digest │
76       │                         │ (sha256:+64-char hash)        │
77       ├─────────────────────────┼───────────────────────────────┤
78.ImageName               Container image name (string) 
79       ├─────────────────────────┼───────────────────────────────┤
80.IsInfra                 │ Is  this  an infra container? │
81       │                         │ (string: true/false)          │
82       ├─────────────────────────┼───────────────────────────────┤
83.IsService               │ Is this a service  container? │
84       │                         │ (string: true/false)          │
85       ├─────────────────────────┼───────────────────────────────┤
86.KubeExitCodePropagation │ Kube   exit-code  propagation │
87       │                         │ (string)                      │
88       ├─────────────────────────┼───────────────────────────────┤
89.LockNumber              │ Number  of  the   container's │
90       │                         │ Libpod lock                   │
91       ├─────────────────────────┼───────────────────────────────┤
92.MountLabel              │ SELinux    label   of   mount │
93       │                         │ (string)                      │
94       ├─────────────────────────┼───────────────────────────────┤
95.Mounts                  Mounts (array of strings)     
96       ├─────────────────────────┼───────────────────────────────┤
97.Name                    Container name (string)       
98       ├─────────────────────────┼───────────────────────────────┤
99.Namespace               Container namespace (string)  
100       ├─────────────────────────┼───────────────────────────────┤
101.NetworkSettings ...     Network settings (struct)     
102       ├─────────────────────────┼───────────────────────────────┤
103.OCIConfigPath           │ Path  to  OCI   config   file │
104       │                         │ (string)                      │
105       ├─────────────────────────┼───────────────────────────────┤
106.OCIRuntime              OCI runtime name (string)     
107       ├─────────────────────────┼───────────────────────────────┤
108.Path                    │ Path   to  container  command │
109       │                         │ (string)                      │
110       ├─────────────────────────┼───────────────────────────────┤
111.PidFile                 │ Path to file containing  con‐ │
112       │                         │ tainer PID (string)           │
113       ├─────────────────────────┼───────────────────────────────┤
114.Pod                     Parent pod (string)           
115       ├─────────────────────────┼───────────────────────────────┤
116.ProcessLabel            │ SELinux   label   of  process │
117       │                         │ (string)                      │
118       ├─────────────────────────┼───────────────────────────────┤
119.ResolvConfPath          │ Path   to   container's   re‐ │
120       │                         │ solv.conf file (string)       │
121       ├─────────────────────────┼───────────────────────────────┤
122.RestartCount            │ Number of times container has │
123       │                         │ been restarted (int)          │
124       ├─────────────────────────┼───────────────────────────────┤
125.Rootfs                  Container rootfs (string)     
126       ├─────────────────────────┼───────────────────────────────┤
127.SizeRootFs              Size of rootfs, in bytes [1]  
128       ├─────────────────────────┼───────────────────────────────┤
129.SizeRw                  │ Size of upper (R/W) container │
130       │                         │ layer, in bytes [1]           │
131       ├─────────────────────────┼───────────────────────────────┤
132.State ...               Container state info (struct) 
133       ├─────────────────────────┼───────────────────────────────┤
134.StaticDir               │ Path  to  container  metadata │
135       │                         │ dir (string)                  │
136       └─────────────────────────┴───────────────────────────────┘
137
138       [1] This format specifier requires the --size option
139
140
141   --latest, -l
142       Instead of providing the container name or ID,  use  the  last  created
143       container.  Note: the last started container can be from other users of
144       Podman on the host machine.  (This option is not available with the re‐
145       mote  Podman  client,  including  Mac  and Windows (excluding WSL2) ma‐
146       chines)
147
148
149   --size, -s
150       In addition to normal output, display the total file size if  the  type
151       is a container.
152
153

EXAMPLE

155       $ podman container inspect foobar
156       [
157           {
158               "Id": "99f66530fe9c7249f7cf29f78e8661669d5831cbe4ee80ea757d5e922dd6a8a6",
159               "Created": "2021-09-16T06:09:08.936623325-04:00",
160               "Path": "echo",
161               "Args": [
162                   "hi"
163               ],
164               "State": {
165                   "OciVersion": "1.0.2-dev",
166                   "Status": "exited",
167                   "Running": false,
168                   "Paused": false,
169                   "Restarting": false,
170                   "OOMKilled": false,
171                   "Dead": false,
172                   "Pid": 0,
173                   "ExitCode": 0,
174                   "Error": "",
175                   "StartedAt": "2021-09-16T06:09:09.033564436-04:00",
176                   "FinishedAt": "2021-09-16T06:09:09.036184314-04:00",
177                   "Healthcheck": {
178                       "Status": "",
179                       "FailingStreak": 0,
180                       "Log": null
181                   }
182               },
183               "Image": "14119a10abf4669e8cdbdff324a9f9605d99697215a0d21c360fe8dfa8471bab",
184               "ImageName": "docker.io/library/alpine:latest",
185               "Rootfs": "",
186               "Pod": "",
187               "ResolvConfPath": "/run/user/3267/containers/overlay-containers/99f66530fe9c7249f7cf29f78e8661669d5831cbe4ee80ea757d5e922dd6a8a6/userdata/resolv.conf",
188               "HostnamePath": "/run/user/3267/containers/overlay-containers/99f66530fe9c7249f7cf29f78e8661669d5831cbe4ee80ea757d5e922dd6a8a6/userdata/hostname",
189               "HostsPath": "/run/user/3267/containers/overlay-containers/99f66530fe9c7249f7cf29f78e8661669d5831cbe4ee80ea757d5e922dd6a8a6/userdata/hosts",
190               "StaticDir": "/home/dwalsh/.local/share/containers/storage/overlay-containers/99f66530fe9c7249f7cf29f78e8661669d5831cbe4ee80ea757d5e922dd6a8a6/userdata",
191               "OCIConfigPath": "/home/dwalsh/.local/share/containers/storage/overlay-containers/99f66530fe9c7249f7cf29f78e8661669d5831cbe4ee80ea757d5e922dd6a8a6/userdata/config.json",
192               "OCIRuntime": "crun",
193               "ConmonPidFile": "/run/user/3267/containers/overlay-containers/99f66530fe9c7249f7cf29f78e8661669d5831cbe4ee80ea757d5e922dd6a8a6/userdata/conmon.pid",
194               "PidFile": "/run/user/3267/containers/overlay-containers/99f66530fe9c7249f7cf29f78e8661669d5831cbe4ee80ea757d5e922dd6a8a6/userdata/pidfile",
195               "Name": "foobar",
196               "RestartCount": 0,
197               "Driver": "overlay",
198               "MountLabel": "system_u:object_r:container_file_t:s0:c25,c695",
199               "ProcessLabel": "system_u:system_r:container_t:s0:c25,c695",
200               "AppArmorProfile": "",
201               "EffectiveCaps": [
202                   "CAP_CHOWN",
203                   "CAP_DAC_OVERRIDE",
204                   "CAP_FOWNER",
205                   "CAP_FSETID",
206                   "CAP_KILL",
207                   "CAP_NET_BIND_SERVICE",
208                   "CAP_SETFCAP",
209                   "CAP_SETGID",
210                   "CAP_SETPCAP",
211                   "CAP_SETUID",
212               ],
213               "BoundingCaps": [
214                   "CAP_CHOWN",
215                   "CAP_DAC_OVERRIDE",
216                   "CAP_FOWNER",
217                   "CAP_FSETID",
218                   "CAP_KILL",
219                   "CAP_NET_BIND_SERVICE",
220                   "CAP_SETFCAP",
221                   "CAP_SETGID",
222                   "CAP_SETPCAP",
223                   "CAP_SETUID",
224               ],
225               "ExecIDs": [],
226               "GraphDriver": {
227                   "Name": "overlay",
228                   "Data": {
229                       "LowerDir": "/home/dwalsh/.local/share/containers/storage/overlay/e2eb06d8af8218cfec8210147357a68b7e13f7c485b991c288c2d01dc228bb68/diff",
230                       "UpperDir": "/home/dwalsh/.local/share/containers/storage/overlay/8f3d70434a3db17410ec4710caf4f251f3e4ed0a96a08124e4b3d4af0a0ea300/diff",
231                       "WorkDir": "/home/dwalsh/.local/share/containers/storage/overlay/8f3d70434a3db17410ec4710caf4f251f3e4ed0a96a08124e4b3d4af0a0ea300/work"
232                   }
233               },
234               "Mounts": [],
235               "Dependencies": [],
236               "NetworkSettings": {
237                   "EndpointID": "",
238                   "Gateway": "",
239                   "IPAddress": "",
240                   "IPPrefixLen": 0,
241                   "IPv6Gateway": "",
242                   "GlobalIPv6Address": "",
243                   "GlobalIPv6PrefixLen": 0,
244                   "MacAddress": "",
245                   "Bridge": "",
246                   "SandboxID": "",
247                   "HairpinMode": false,
248                   "LinkLocalIPv6Address": "",
249                   "LinkLocalIPv6PrefixLen": 0,
250                   "Ports": {},
251                   "SandboxKey": ""
252               },
253               "Namespace": "",
254               "IsInfra": false,
255               "Config": {
256                   "Hostname": "99f66530fe9c",
257                   "Domainname": "",
258                   "User": "",
259                   "AttachStdin": false,
260                   "AttachStdout": false,
261                   "AttachStderr": false,
262                   "Tty": false,
263                   "OpenStdin": false,
264                   "StdinOnce": false,
265                   "Env": [
266                       "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
267                       "TERM=xterm",
268                       "container=podman",
269                       "HOME=/root",
270                       "HOSTNAME=99f66530fe9c"
271                   ],
272                   "Cmd": [
273                       "echo",
274                       "hi"
275                   ],
276                   "Image": "docker.io/library/alpine:latest",
277                   "Volumes": null,
278                   "WorkingDir": "/",
279                   "Entrypoint": "",
280                   "OnBuild": null,
281                   "Labels": null,
282                   "Annotations": {
283                       "io.container.manager": "libpod",
284                       "io.kubernetes.cri-o.Created": "2021-09-16T06:09:08.936623325-04:00",
285                       "org.opencontainers.image.stopSignal": "15"
286                   },
287                   "StopSignal": 15,
288                   "CreateCommand": [
289                       "podman",
290                       "run",
291                       "--name",
292                       "foobar",
293                       "alpine",
294                       "echo",
295                       "hi"
296                   ],
297                   "Timezone": "local",
298                   "Umask": "0022",
299                   "Timeout": 0,
300                   "StopTimeout": 10
301               },
302               "HostConfig": {
303                   "Binds": [],
304                   "CgroupManager": "systemd",
305                   "CgroupMode": "private",
306                   "ContainerIDFile": "",
307                   "LogConfig": {
308                       "Type": "journald",
309                       "Config": null,
310                       "Path": "",
311                       "Tag": "",
312                       "Size": "0B"
313                   },
314                   "NetworkMode": "slirp4netns",
315                   "PortBindings": {},
316                   "RestartPolicy": {
317                       "Name": "",
318                       "MaximumRetryCount": 0
319                   },
320                   "AutoRemove": false,
321                   "VolumeDriver": "",
322                   "VolumesFrom": null,
323                   "CapAdd": [],
324                   "CapDrop": [],
325                   "Dns": [],
326                   "DnsOptions": [],
327                   "DnsSearch": [],
328                   "ExtraHosts": [],
329                   "GroupAdd": [],
330                   "IpcMode": "shareable",
331                   "Cgroup": "",
332                   "Cgroups": "default",
333                   "Links": null,
334                   "OomScoreAdj": 0,
335                   "PidMode": "private",
336                   "Privileged": false,
337                   "PublishAllPorts": false,
338                   "ReadonlyRootfs": false,
339                   "SecurityOpt": [],
340                   "Tmpfs": {},
341                   "UTSMode": "private",
342                   "UsernsMode": "",
343                   "ShmSize": 65536000,
344                   "Runtime": "oci",
345                   "ConsoleSize": [
346                       0,
347                       0
348                   ],
349                   "Isolation": "",
350                   "CpuShares": 0,
351                   "Memory": 0,
352                   "NanoCpus": 0,
353                   "CgroupParent": "user.slice",
354                   "BlkioWeight": 0,
355                   "BlkioWeightDevice": null,
356                   "BlkioDeviceReadBps": null,
357                   "BlkioDeviceWriteBps": null,
358                   "BlkioDeviceReadIOps": null,
359                   "BlkioDeviceWriteIOps": null,
360                   "CpuPeriod": 0,
361                   "CpuQuota": 0,
362                   "CpuRealtimePeriod": 0,
363                   "CpuRealtimeRuntime": 0,
364                   "CpusetCpus": "",
365                   "CpusetMems": "",
366                   "Devices": [],
367                   "DiskQuota": 0,
368                   "KernelMemory": 0,
369                   "MemoryReservation": 0,
370                   "MemorySwap": 0,
371                   "MemorySwappiness": 0,
372                   "OomKillDisable": false,
373                   "PidsLimit": 2048,
374                   "Ulimits": [],
375                   "CpuCount": 0,
376                   "CpuPercent": 0,
377                   "IOMaximumIOps": 0,
378                   "IOMaximumBandwidth": 0,
379                   "CgroupConf": null
380               }
381           }
382       ]
383
384
385       $ podman container inspect nervous_fermi --format "{{.ImageName}}"
386       registry.access.redhat.com/ubi8:latest
387
388
389       $ podman container inspect foobar --format "{{.GraphDriver.Name}}"
390       overlay
391
392
393       $ podman container inspect --latest --format {{.EffectiveCaps}}
394       [CAP_CHOWN CAP_DAC_OVERRIDE CAP_FOWNER CAP_FSETID CAP_KILL CAP_NET_BIND_SERVICE CAP_SETFCAP CAP_SETGID CAP_SETPCAP CAP_SETUID]
395
396
397

SEE ALSO

399       podman(1), podman-container(1), podman-inspect(1)
400
401

HISTORY

403       Sep   2021,   Originally   compiled   by  Dan  Walsh  dwalsh@redhat.com
404       ⟨mailto:dwalsh@redhat.com⟩
405
406
407
408                                                   podman-container-inspect(1)
Impressum