podman-container-inspect - Display a container’s configuration


podman container inspect [options] container [container …]


This displays the low-level information on containers identified by name or ID. By default, this renders all results in a JSON array. If a format is specified, the given template is executed for each result.


--format, -f=format

Format the output using the given Go template. The keys of the returned JSON can be used as the values for the --format flag (see examples below).

Valid placeholders for the Go template are listed below:




AppArmor profile (string)


Command-line arguments (array of strings)


Bounding capability set (array of strings)

.Config …

Structure with config info


Path to file containing conmon pid (string)

.Created …

Container creation time (string, ISO3601)


Dependencies (array of strings)


Storage driver (string)


Effective capability set (array of strings)


Exec IDs (array of strings)

.GraphDriver …

Further details of graph driver (struct)

.HostConfig …

Host config details (struct)


Path to file containing hostname (string)


Path to container /etc/hosts file (string)


Container ID (full 64-char hash)


Container image ID (64-char hash)


Container image digest (sha256:+64-char hash)


Container image name (string)


Is this an infra container? (string: true/false)


Is this a service container? (string: true/false)


Kube exit-code propagation (string)


Number of the container’s Libpod lock


SELinux label of mount (string)


Mounts (array of strings)


Container name (string)


Container namespace (string)

.NetworkSettings …

Network settings (struct)


Path to OCI config file (string)


OCI runtime name (string)


Path to container command (string)


Path to file containing container PID (string)


Parent pod (string)


SELinux label of process (string)


Path to container’s resolv.conf file (string)


Number of times container has been restarted (int)


Container rootfs (string)


Size of rootfs, in bytes [1]


Size of upper (R/W) container layer, in bytes [1]

.State …

Container state info (struct)


Path to container metadata dir (string)

[1] This format specifier requires the --size option

--latest, -l

Instead of providing the container name or ID, use the last created container. Note: the last started container can be from other users of Podman on the host machine. (This option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines)

--size, -s

In addition to normal output, display the total file size if the type is a container.


Inspect the specified container and print its information in json format.

$ podman container inspect foobar
        "Id": "99f66530fe9c7249f7cf29f78e8661669d5831cbe4ee80ea757d5e922dd6a8a6",
        "Created": "2021-09-16T06:09:08.936623325-04:00",
        "Path": "echo",
        "Args": [
        "State": {
            "OciVersion": "1.0.2-dev",
            "Status": "exited",
            "Running": false,
            "Paused": false,
            "Restarting": false,
            "OOMKilled": false,
            "Dead": false,
            "Pid": 0,
            "ExitCode": 0,
            "Error": "",
            "StartedAt": "2021-09-16T06:09:09.033564436-04:00",
            "FinishedAt": "2021-09-16T06:09:09.036184314-04:00",
            "Healthcheck": {
                "Status": "",
                "FailingStreak": 0,
                "Log": null
        "Image": "14119a10abf4669e8cdbdff324a9f9605d99697215a0d21c360fe8dfa8471bab",
        "ImageName": "",
        "Rootfs": "",
        "Pod": "",
        "ResolvConfPath": "/run/user/3267/containers/overlay-containers/99f66530fe9c7249f7cf29f78e8661669d5831cbe4ee80ea757d5e922dd6a8a6/userdata/resolv.conf",
        "HostnamePath": "/run/user/3267/containers/overlay-containers/99f66530fe9c7249f7cf29f78e8661669d5831cbe4ee80ea757d5e922dd6a8a6/userdata/hostname",
        "HostsPath": "/run/user/3267/containers/overlay-containers/99f66530fe9c7249f7cf29f78e8661669d5831cbe4ee80ea757d5e922dd6a8a6/userdata/hosts",
        "StaticDir": "/home/dwalsh/.local/share/containers/storage/overlay-containers/99f66530fe9c7249f7cf29f78e8661669d5831cbe4ee80ea757d5e922dd6a8a6/userdata",
        "OCIConfigPath": "/home/dwalsh/.local/share/containers/storage/overlay-containers/99f66530fe9c7249f7cf29f78e8661669d5831cbe4ee80ea757d5e922dd6a8a6/userdata/config.json",
        "OCIRuntime": "crun",
        "ConmonPidFile": "/run/user/3267/containers/overlay-containers/99f66530fe9c7249f7cf29f78e8661669d5831cbe4ee80ea757d5e922dd6a8a6/userdata/",
        "PidFile": "/run/user/3267/containers/overlay-containers/99f66530fe9c7249f7cf29f78e8661669d5831cbe4ee80ea757d5e922dd6a8a6/userdata/pidfile",
        "Name": "foobar",
        "RestartCount": 0,
        "Driver": "overlay",
        "MountLabel": "system_u:object_r:container_file_t:s0:c25,c695",
        "ProcessLabel": "system_u:system_r:container_t:s0:c25,c695",
        "AppArmorProfile": "",
        "EffectiveCaps": [
        "BoundingCaps": [
        "ExecIDs": [],
        "GraphDriver": {
            "Name": "overlay",
            "Data": {
                "LowerDir": "/home/dwalsh/.local/share/containers/storage/overlay/e2eb06d8af8218cfec8210147357a68b7e13f7c485b991c288c2d01dc228bb68/diff",
                "UpperDir": "/home/dwalsh/.local/share/containers/storage/overlay/8f3d70434a3db17410ec4710caf4f251f3e4ed0a96a08124e4b3d4af0a0ea300/diff",
                "WorkDir": "/home/dwalsh/.local/share/containers/storage/overlay/8f3d70434a3db17410ec4710caf4f251f3e4ed0a96a08124e4b3d4af0a0ea300/work"
        "Mounts": [],
        "Dependencies": [],
        "NetworkSettings": {
            "EndpointID": "",
            "Gateway": "",
            "IPAddress": "",
            "IPPrefixLen": 0,
            "IPv6Gateway": "",
            "GlobalIPv6Address": "",
            "GlobalIPv6PrefixLen": 0,
            "MacAddress": "",
            "Bridge": "",
            "SandboxID": "",
            "HairpinMode": false,
            "LinkLocalIPv6Address": "",
            "LinkLocalIPv6PrefixLen": 0,
            "Ports": {},
            "SandboxKey": ""
        "Namespace": "",
        "IsInfra": false,
        "Config": {
            "Hostname": "99f66530fe9c",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
            "Cmd": [
            "Image": "",
            "Volumes": null,
            "WorkingDir": "/",
            "Entrypoint": "",
            "OnBuild": null,
            "Labels": null,
            "Annotations": {
                "io.container.manager": "libpod",
                "io.kubernetes.cri-o.Created": "2021-09-16T06:09:08.936623325-04:00",
                "org.opencontainers.image.stopSignal": "15"
            "StopSignal": 15,
            "CreateCommand": [
            "Timezone": "local",
            "Umask": "0022",
            "Timeout": 0,
            "StopTimeout": 10
        "HostConfig": {
            "Binds": [],
            "CgroupManager": "systemd",
            "CgroupMode": "private",
            "ContainerIDFile": "",
            "LogConfig": {
                "Type": "journald",
                "Config": null,
                "Path": "",
                "Tag": "",
                "Size": "0B"
            "NetworkMode": "slirp4netns",
            "PortBindings": {},
            "RestartPolicy": {
                "Name": "",
                "MaximumRetryCount": 0
            "AutoRemove": false,
            "VolumeDriver": "",
            "VolumesFrom": null,
            "CapAdd": [],
            "CapDrop": [],
            "Dns": [],
            "DnsOptions": [],
            "DnsSearch": [],
            "ExtraHosts": [],
            "GroupAdd": [],
            "IpcMode": "shareable",
            "Cgroup": "",
            "Cgroups": "default",
            "Links": null,
            "OomScoreAdj": 0,
            "PidMode": "private",
            "Privileged": false,
            "PublishAllPorts": false,
            "ReadonlyRootfs": false,
            "SecurityOpt": [],
            "Tmpfs": {},
            "UTSMode": "private",
            "UsernsMode": "",
            "ShmSize": 65536000,
            "Runtime": "oci",
            "ConsoleSize": [
            "Isolation": "",
            "CpuShares": 0,
            "Memory": 0,
            "NanoCpus": 0,
            "CgroupParent": "user.slice",
            "BlkioWeight": 0,
            "BlkioWeightDevice": null,
            "BlkioDeviceReadBps": null,
            "BlkioDeviceWriteBps": null,
            "BlkioDeviceReadIOps": null,
            "BlkioDeviceWriteIOps": null,
            "CpuPeriod": 0,
            "CpuQuota": 0,
            "CpuRealtimePeriod": 0,
            "CpuRealtimeRuntime": 0,
            "CpusetCpus": "",
            "CpusetMems": "",
            "Devices": [],
            "DiskQuota": 0,
            "KernelMemory": 0,
            "MemoryReservation": 0,
            "MemorySwap": 0,
            "MemorySwappiness": 0,
            "OomKillDisable": false,
            "PidsLimit": 2048,
            "Ulimits": [],
            "CpuCount": 0,
            "CpuPercent": 0,
            "IOMaximumIOps": 0,
            "IOMaximumBandwidth": 0,
            "CgroupConf": null

Inspect the specified container for the Image Name it is based on.

$ podman container inspect nervous_fermi --format "{{.ImageName}}"

Inspect the specified container for the GraphDriver Name it is running with.

$ podman container inspect foobar --format "{{.GraphDriver.Name}}"

Inspect the latest container created for its EffectiveCaps field. (This option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines)

$ podman container inspect --latest --format {{.EffectiveCaps}}


podman(1), podman-container(1), podman-inspect(1)


Sep 2021, Originally compiled by Dan Walsh