1podman-inspect(1)           General Commands Manual          podman-inspect(1)
2
3
4

NAME

6       podman-inspect  - Display a container, image, volume, network, or pod's
7       configuration
8
9

SYNOPSIS

11       podman inspect [options] name [...]
12
13

DESCRIPTION

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 also podman-container-inspect(1), pod‐
26       man-image-inspect(1), podman-network-inspect(1), podman-pod-inspect(1),
27       and podman-volume-inspect(1).
28
29

OPTIONS

31   --format, -f=format
32       Format  the  output  using  the given Go template.  The keys of the re‐
33       turned JSON can be used as the values for the --format flag (see  exam‐
34       ples below).
35
36
37   --latest, -l
38       Instead  of  providing  the  container name or ID, use the last created
39       container. If you use methods other than Podman to run containers  such
40       as  CRI-O,  the  last  started  container could be from either of those
41       methods.
42
43
44       This option can be used to inspect the latest  pod  created  when  used
45       with  --type  pod. (This option is not available with the remote Podman
46       client, including Mac and Windows (excluding WSL2)  machines,  or  when
47       invoked as podman image inspect.)
48
49
50   --size, -s
51       In  addition  to normal output, display the total file size if the type
52       is a container.
53
54
55   --type, -t=type
56       Return JSON for the specified type.  Type can be 'container',  'image',
57       'volume',  'network',  'pod',  or 'all' (default: all) (Only meaningful
58       when invoked as podman inspect)
59
60

EXAMPLE

62              # podman inspect fedora
63              [
64                  {
65                      "Id": "f0858ad3febdf45bb2e5501cb459affffacef081f79eaa436085c3b6d9bd46ca",
66                      "Digest": "sha256:d4f7df6b691d61af6cee7328f82f1d8afdef63bc38f58516858ae3045083924a",
67                      "RepoTags": [
68                          "docker.io/library/fedora:latest"
69                      ],
70                      "RepoDigests": [
71                          "docker.io/library/fedora@sha256:8fa60b88e2a7eac8460b9c0104b877f1aa0cea7fbc03c701b7e545dacccfb433",
72                          "docker.io/library/fedora@sha256:d4f7df6b691d61af6cee7328f82f1d8afdef63bc38f58516858ae3045083924a"
73                      ],
74                      "Parent": "",
75                      "Comment": "",
76                      "Created": "2019-10-29T03:23:37.695123423Z",
77                      "Config": {
78                          "Env": [
79                              "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
80                              "DISTTAG=f31-updates-candidatecontainer",
81                              "FGC=f31-updates-candidate",
82                              "FBR=f31-updates-candidate"
83                          ],
84                          "Cmd": [
85                              "/bin/bash"
86                          ],
87                          "Labels": {
88                              "maintainer": "Clement Verna \u003ccverna@fedoraproject.org\u003e"
89                          }
90                      },
91                      "Version": "18.06.1-ce",
92                      "Author": "",
93                      "Architecture": "amd64",
94                      "Os": "linux",
95                      "Size": 201096840,
96                      "VirtualSize": 201096840,
97                      "GraphDriver": {
98                          "Name": "overlay",
99                          "Data": {
100                              "UpperDir": "/home/user/.local/share/containers/storage/overlay/2ae3cee18c8ef9e0d448649747dab81c4f1ca2714a8c4550eff49574cab262c9/diff",
101                              "WorkDir": "/home/user/.local/share/containers/storage/overlay/2ae3cee18c8ef9e0d448649747dab81c4f1ca2714a8c4550eff49574cab262c9/work"
102                          }
103                      },
104                      "RootFS": {
105                          "Type": "layers",
106                          "Layers": [
107                              "sha256:2ae3cee18c8ef9e0d448649747dab81c4f1ca2714a8c4550eff49574cab262c9"
108                          ]
109                      },
110                      "Labels": {
111                          "maintainer": "Clement Verna \u003ccverna@fedoraproject.org\u003e"
112                      },
113                      "Annotations": {},
114                      "ManifestType": "application/vnd.docker.distribution.manifest.v2+json",
115                      "User": "",
116                      "History": [
117                          {
118                              "created": "2019-01-16T21:21:55.569693599Z",
119                              "created_by": "/bin/sh -c #(nop)  LABEL maintainer=Clement Verna \u003ccverna@fedoraproject.org\u003e",
120                              "empty_layer": true
121                          },
122                          {
123                              "created": "2019-09-27T21:21:07.784469821Z",
124                              "created_by": "/bin/sh -c #(nop)  ENV DISTTAG=f31-updates-candidatecontainer FGC=f31-updates-candidate FBR=f31-updates-candidate",
125                              "empty_layer": true
126                          },
127                          {
128                              "created": "2019-10-29T03:23:37.355187998Z",
129                              "created_by": "/bin/sh -c #(nop) ADD file:298f828afc880ccde9205fc4418435d5e696ad165e283f0530d0b1a74326d6dc in / "
130                          },
131                          {
132                              "created": "2019-10-29T03:23:37.695123423Z",
133                              "created_by": "/bin/sh -c #(nop)  CMD [\"/bin/bash\"]",
134                              "empty_layer": true
135                          }
136                      ],
137                      "NamesHistory": []
138                  }
139              ]
140
141
142
143              # podman inspect a04 --format "{{.ImageName}}"
144              fedora
145
146
147
148              # podman inspect a04 --format "{{.GraphDriver.Name}}"
149              overlay
150
151
152
153              # podman image inspect --format "size: {{.Size}}" alpine
154              size:   4405240
155
156
157
158              podman container inspect --latest --format {{.EffectiveCaps}}
159              [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]
160
161
162
163              # podman inspect myPod --type pod --format "{{.Name}}"
164              myPod
165
166
167
168              # podman inspect myVolume --type volume --format "{{.Name}}"
169              myVolume
170
171
172
173              # podman inspect nyNetwork --type network --format "{{.name}}"
174              myNetwork
175
176
177

SEE ALSO

179       podman(1), podman-container-inspect(1),  podman-image-inspect(1),  pod‐
180       man-network-inspect(1), podman-pod-inspect(1), podman-volume-inspect(1)
181
182

HISTORY

184       July   2017,   Originally   compiled  by  Dan  Walsh  dwalsh@redhat.com
185       ⟨mailto:dwalsh@redhat.com⟩
186
187
188
189                                                             podman-inspect(1)
Impressum