NAME 名称

podman-image-inspect - Display an image’s configuration
podman-image-inspect - 显示镜像的配置

SYNOPSIS 概要

podman image inspect [options] image [image …]
podman image inspect [选项] 镜像 [镜像 …]

DESCRIPTION 描述

This displays the low-level information on images 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.
这将显示通过名称或 ID 标识的镜像的低级信息。默认情况下,这会将所有结果呈现为 JSON 数组。如果指定了格式,则为每个结果执行给定的模板。

OPTIONS 选项

--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).
使用给定的 Go 模板格式化输出。返回的 JSON 的键可以用作 --format 标志的值(请参见下面的示例)。

Valid placeholders for the Go template are listed below:
Go 模板的有效占位符如下所示:

Placeholder

Description

.Annotations … .注释...

Annotation information included in the image
包含在图像中的注释信息

.Architecture

Architecture of software in the image
图像中软件的架构

.Author

Image author 图像作者

.Comment

Image comment 图像评论

.Config … .配置 …

Structure with config info
带有配置信息的结构

.Created … .创建…

Image creation time (string, ISO3601)
图像创建时间(字符串,ISO3601)

.Digest

Image digest (sha256:+64-char hash)
图像摘要(sha256:+64 个字符的哈希值)

.GraphDriver … .GraphDriver ...

Structure for the graph driver info
用于图形驱动程序信息的结构

.HealthCheck …

Structure for the health check info
用于健康检查信息的结构

.History

History information stored in image
存储在图像中的历史信息

.ID

Image ID (full 64-char hash)
图像 ID(完整的 64 位哈希值)

.Labels … .标签 …

Label information included in the image
图像中包含的标签信息

.ManifestType

Manifest type of the image
图像的清单类型

.NamesHistory

Name history information stored in image
存储在图像中的名称历史信息

.Os

Operating system of software in the image
图像中软件的操作系统

.Parent

Parent image of the specified image
指定图像的父图像

.RepoDigests

Repository digests for the image
镜像的存储库摘要

.RepoTags

Repository tags for the image
镜像的存储库标签

.RootFS …

Structure for the root file system info
根文件系统信息的结构

.Size

Size of image, in bytes
图像的大小,以字节为单位

.User

Default user to execute the image as
作为图像执行的默认用户

.Version

Image Version 图像版本

.VirtualSize

Virtual size of image, in bytes
图像的虚拟大小,以字节为单位

EXAMPLE 例子 ¶

Inspect information on the specified image:
检查指定图像的信息:

$ podman image inspect fedora
[
    {
        "Id": "37e5619f4a8ca9dbc4d6c0ae7890625674a10dbcfb76201399e2aaddb40da17d",
        "Digest": "sha256:1b0d4ddd99b1a8c8a80e885aafe6034c95f266da44ead992aab388e6aa91611a",
        "RepoTags": [
            "registry.fedoraproject.org/fedora:latest"
        ],
        "RepoDigests": [
            "registry.fedoraproject.org/fedora@sha256:1b0d4ddd99b1a8c8a80e885aafe6034c95f266da44ead992aab388e6aa91611a",
            "registry.fedoraproject.org/fedora@sha256:b5290db40008aae9272ad3a6bd8070ef7ecd547c3bef014b894c327960acc582"
        ],
        "Parent": "",
        "Comment": "Created by Image Factory",
        "Created": "2021-08-09T05:48:47Z",
        "Config": {
            "Env": [
                "DISTTAG=f34container",
                "FGC=f34",
                "container=oci"
            ],
            "Cmd": [
                "/bin/bash"
            ],
            "Labels": {
                "license": "MIT",
                "name": "fedora",
                "vendor": "Fedora Project",
                "version": "34"
            }
        },
        "Version": "1.10.1",
        "Author": "",
        "Architecture": "amd64",
        "Os": "linux",
        "Size": 183852302,
        "VirtualSize": 183852302,
        "GraphDriver": {
            "Name": "overlay",
            "Data": {
                "UpperDir": "/home/dwalsh/.local/share/containers/storage/overlay/0203e243f1ca4b6bb49371ecd21363212467ec6d7d3fa9f324cd4e78cc6b5fa2/diff",
                "WorkDir": "/home/dwalsh/.local/share/containers/storage/overlay/0203e243f1ca4b6bb49371ecd21363212467ec6d7d3fa9f324cd4e78cc6b5fa2/work"
            }
        },
        "RootFS": {
            "Type": "layers",
            "Layers": [
                "sha256:0203e243f1ca4b6bb49371ecd21363212467ec6d7d3fa9f324cd4e78cc6b5fa2"
            ]
        },
        "Labels": {
            "license": "MIT",
            "name": "fedora",
            "vendor": "Fedora Project",
            "version": "34"
        },
        "Annotations": {},
        "ManifestType": "application/vnd.docker.distribution.manifest.v2+json",
        "User": "",
        "History": [
            {
                "created": "2021-08-09T05:48:47Z",
                "comment": "Created by Image Factory"
            }
        ],
        "NamesHistory": [
            "registry.fedoraproject.org/fedora:latest"
        ]
    }
]

Inspect image ID for the specified image:
检查指定图像的图像 ID:

$ podman image inspect --format '{{ .Id }}' fedora
37e5619f4a8ca9dbc4d6c0ae7890625674a10dbcfb76201399e2aaddb40da17d

SEE ALSO 参见 ¶

podman(1), podman-image(1), podman-inspect(1)

HISTORY 历史 ¶

Sep 2021, Originally compiled by Dan Walsh dwalsh@redhat.com
2021 年 9 月,最初由 Dan Walsh dwalsh@redhat.com 编写