NAME¶ 名称
podman-history - Show the history of an image
podman-history - 显示镜像的历史记录
SYNOPSIS¶ 概要
podman history [options] image[:tag|@digest]
podman history [选项] 镜像[:标签|@摘要]
podman image history [options] image[:tag|@digest]
podman image history [选项] 镜像[:标签|@摘要]
DESCRIPTION¶ 描述
podman history displays the history of an image by printing out information
about each layer used in the image. The information printed out for each layer
include Created (time and date), Created By, Size, and Comment. The output can
be truncated or not using the --no-trunc flag. If the --human flag is
set, the time of creation and size are printed out in a human readable format.
The --quiet flag displays the ID of the image only when set and the --format
flag is used to print the information using the Go template provided by the user.
podman history 显示图像的历史记录,打印出有关图像中使用的每个层的信息。 每个层的打印信息包括创建时间(日期和时间)、创建者、大小和注释。 输出可以使用 --no-trunc 标志截断或不截断。 如果设置了 --human 标志,则以人类可读的格式打印出创建时间和大小。 当设置 --quiet 标志时,仅在设置时显示图像的 ID,使用 --format 标志可使用用户提供的 Go 模板打印信息。
OPTIONS¶ 选项
--format=format¶
Alter the output for a format like ‘json’ or a Go template.
更改输出格式,如 'json' 或 Go 模板。
Valid placeholders for the Go template are listed below:
Go 模板的有效占位符如下所示:
Placeholder |
Description |
---|---|
.Comment |
Comment for the layer 层的注释 |
.Created |
if --human, time elapsed since creation, otherwise time stamp of creation |
.CreatedAt |
Time when the image layer was created |
.CreatedBy |
Command used to create the layer |
.CreatedSince |
Elapsed time since the image layer was created |
.ID |
Image ID 图像 ID |
.Size |
Size of layer on disk |
.Tags |
Image tags 图像标签 |
--help, -h¶ --help,-h ¶
Print usage statement 打印使用说明
--human, -H¶
Display sizes and dates in human readable format (default true).
以人类可读的格式显示大小和日期(默认为 true)。
--no-trunc¶
Do not truncate the output (default false).
不要截断输出(默认为 false)。
--quiet, -q¶
Print the numeric IDs only (default false).
仅打印数字 ID(默认为 false)。
EXAMPLES¶ 示例
Show the history of the specified image:
显示指定图像的历史记录:
$ podman history debian
ID CREATED CREATED BY SIZE COMMENT
b676ca55e4f2c 9 weeks ago /bin/sh -c #(nop) CMD ["bash"] 0 B
<missing> 9 weeks ago /bin/sh -c #(nop) ADD file:ebba725fb97cea4... 45.14 MB
Show the history of the specified image without truncating content and using raw data:
显示指定图像的完整历史记录,不截断内容并使用原始数据:
$ podman history --no-trunc=true --human=false debian
ID CREATED CREATED BY SIZE COMMENT
b676ca55e4f2c 2017-07-24T16:52:55Z /bin/sh -c #(nop) CMD ["bash"] 0
<missing> 2017-07-24T16:52:54Z /bin/sh -c #(nop) ADD file:ebba725fb97cea4... 45142935
Show the formatted history of the specified image:
显示指定图像的格式化历史记录:
$ podman history --format "{{.ID}} {{.Created}}" debian
b676ca55e4f2c 9 weeks ago
<missing> 9 weeks ago
Show the history in JSON format for the specified image:
以 JSON 格式显示指定图像的历史记录:
$ podman history --format json debian
[
{
"id": "b676ca55e4f2c0ce53d0636438c5372d3efeb5ae99b676fa5a5d1581bad46060",
"created": "2017-07-24T16:52:55.195062314Z",
"createdBy": "/bin/sh -c #(nop) CMD [\"bash\"]",
"size": 0,
"comment": ""
},
{
"id": "b676ca55e4f2c0ce53d0636438c5372d3efeb5ae99b676fa5a5d1581bad46060",
"created": "2017-07-24T16:52:54.898893387Z",
"createdBy": "/bin/sh -c #(nop) ADD file:ebba725fb97cea45d0b1b35ccc8144e766fcfc9a78530465c23b0c4674b14042 in / ",
"size": 45142935,
"comment": ""
}
]
SEE ALSO¶ 参见 ¶
HISTORY¶ 历史 ¶
July 2017, Originally compiled by Urvashi Mohnani umohnani@redhat.com
2017 年 7 月,最初由 Urvashi Mohnani umohnani@redhat.com 编写