aboutsummaryrefslogtreecommitdiff
path: root/docs/source/markdown/podman-inspect.1.md
blob: 4998772c35ea1f2e2626d46cce17bcade713a3ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
% podman-inspect(1)

## NAME
podman\-inspect - Display a container or image's configuration

## SYNOPSIS
**podman inspect** [*options*] *name* [...]

**podman image inspect** [*options*] *image*

**podman container inspect** [*options*] *container*

## DESCRIPTION
This displays the low-level information on containers and images identified by name or ID. By default, this will render
all results in a JSON array. If the container and image have the same name, this will return container JSON for
unspecified type. If a format is specified, the given template will be executed for each result.

## OPTIONS

**--type**, **-t**=*type*

Return JSON for the specified type.  Type can be 'container', 'image' or 'all' (default: all)
(Only meaningful when invoked as *podman inspect*)

**--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).

**--latest**, **-l**

Instead of providing the container name or ID, use the last created container. If you use methods other than Podman
to run containers such as CRI-O, the last started container could be from either of those methods.

The latest option is not supported on the remote client or when invoked as *podman image inspect*.

**--size**, **-s**

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


## EXAMPLE

```
# podman inspect fedora
[
    {
        "Id": "f0858ad3febdf45bb2e5501cb459affffacef081f79eaa436085c3b6d9bd46ca",
        "Digest": "sha256:d4f7df6b691d61af6cee7328f82f1d8afdef63bc38f58516858ae3045083924a",
        "RepoTags": [
            "docker.io/library/fedora:latest"
        ],
        "RepoDigests": [
            "docker.io/library/fedora@sha256:8fa60b88e2a7eac8460b9c0104b877f1aa0cea7fbc03c701b7e545dacccfb433",
            "docker.io/library/fedora@sha256:d4f7df6b691d61af6cee7328f82f1d8afdef63bc38f58516858ae3045083924a"
        ],
        "Parent": "",
        "Comment": "",
        "Created": "2019-10-29T03:23:37.695123423Z",
        "Config": {
            "Env": [
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "DISTTAG=f31-updates-candidatecontainer",
                "FGC=f31-updates-candidate",
                "FBR=f31-updates-candidate"
            ],
            "Cmd": [
                "/bin/bash"
            ],
            "Labels": {
                "maintainer": "Clement Verna \u003ccverna@fedoraproject.org\u003e"
            }
        },
        "Version": "18.06.1-ce",
        "Author": "",
        "Architecture": "amd64",
        "Os": "linux",
        "Size": 201096840,
        "VirtualSize": 201096840,
        "GraphDriver": {
            "Name": "overlay",
            "Data": {
                "UpperDir": "/home/user/.local/share/containers/storage/overlay/2ae3cee18c8ef9e0d448649747dab81c4f1ca2714a8c4550eff49574cab262c9/diff",
                "WorkDir": "/home/user/.local/share/containers/storage/overlay/2ae3cee18c8ef9e0d448649747dab81c4f1ca2714a8c4550eff49574cab262c9/work"
            }
        },
        "RootFS": {
            "Type": "layers",
            "Layers": [
                "sha256:2ae3cee18c8ef9e0d448649747dab81c4f1ca2714a8c4550eff49574cab262c9"
            ]
        },
        "Labels": {
            "maintainer": "Clement Verna \u003ccverna@fedoraproject.org\u003e"
        },
        "Annotations": {},
        "ManifestType": "application/vnd.docker.distribution.manifest.v2+json",
        "User": "",
        "History": [
            {
                "created": "2019-01-16T21:21:55.569693599Z",
                "created_by": "/bin/sh -c #(nop)  LABEL maintainer=Clement Verna \u003ccverna@fedoraproject.org\u003e",
                "empty_layer": true
            },
            {
                "created": "2019-09-27T21:21:07.784469821Z",
                "created_by": "/bin/sh -c #(nop)  ENV DISTTAG=f31-updates-candidatecontainer FGC=f31-updates-candidate FBR=f31-updates-candidate",
                "empty_layer": true
            },
            {
                "created": "2019-10-29T03:23:37.355187998Z",
                "created_by": "/bin/sh -c #(nop) ADD file:298f828afc880ccde9205fc4418435d5e696ad165e283f0530d0b1a74326d6dc in / "
            },
            {
                "created": "2019-10-29T03:23:37.695123423Z",
                "created_by": "/bin/sh -c #(nop)  CMD [\"/bin/bash\"]",
                "empty_layer": true
            }
        ],
        "NamesHistory": []
    }
]
```

```
# podman inspect a04 --format "{{.ImageName}}"
fedora
```

```
# podman inspect a04 --format "{{.GraphDriver.Name}}"
overlay
```

```
# podman image inspect --format "size: {{.Size}}" alpine
size:   4405240
```

```
podman container inspect --latest --format {{.EffectiveCaps}}
[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]
```

## SEE ALSO
podman(1)

## HISTORY
July 2017, Originally compiled by Dan Walsh <dwalsh@redhat.com>