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