NAME

Podman-历史-显示图像的历史记录

SYNOPSIS

podman history [options] image[:tag|@digest]

podman image history [options] image[:tag|@digest]

DESCRIPTION

podman history 通过打印图像中使用的每个层的信息来显示图像的历史记录。为每个层打印的信息包括创建者(时间和日期)、创建者、大小和注释。可以截断输出,也可以不使用 --no-trunc 旗帜。如果 --human 标志后,创建时间和大小将以人类可读的格式打印出来。这个 --quiet 标志仅在设置时显示图像的ID,并且 --format 标志用于使用用户提供的GO模板打印信息。

OPTIONS

--format = 格式化

将输出更改为类似‘json’或GO模板的格式。

下面列出了GO模板的有效占位符:

Placeholder

Description

.评论

为该层添加注释

.已创建

如果是--Human,则表示自创建以来经过的时间,否则为创建的时间戳

.创建时间

创建图像图层的时间

.创建者

用于创建层的命令

.已创建自

自创建图像图层以来经过的时间

.id

图像ID

.Size

磁盘上的层大小

.标签

图像标签

--help-h

打印用法报表

--human-H

以人类可读的格式显示大小和日期(默认 true )。

--no-trunc

不截断输出(默认 错误 )。

--quiet-q

仅打印数字ID(默认 错误 )。

EXAMPLES

显示指定映像的历史记录:

$ 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

在不截断内容和使用原始数据的情况下显示指定图像的历史:

$ 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

显示指定图像的格式化历史记录:

$ podman history --format "{{.ID}} {{.Created}}" debian
b676ca55e4f2c   9 weeks ago
<missing>       9 weeks ago

以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": ""
    }
]

另请参阅

[podman(1)]

HISTORY

2017年7月,最初由Urvashi Mohnaniumohnani@redhat.com汇编