NAME

Podman-图像-列出本地存储中的图像

SYNOPSIS

podman images [options] [image]

podman image list [options] [image]

podman image ls [options] [image]

DESCRIPTION

显示本地存储的图像、其名称和ID。

OPTIONS

--all-a

显示所有图像(默认情况下过滤掉中间图像层)。默认值为FALSE。

--digests

显示图像摘要

--filter-f = 过滤

提供筛选器值。

The filters argument format is of key=value or key!=value. If there is more than one filter, then pass multiple OPTIONS: --filter foo=bar --filter bif=baz.

支持的筛选器:

过滤

描述

ID号

按图像ID过滤。

在此之前

按在给定图像(名称或标签)之前创建的图像进行过滤。

集装箱

使用运行的容器按图像进行过滤。

晃来晃去的

通过悬挂(未使用的)图像进行过滤。

摘要

按摘要过滤。

中级

按悬挂且没有子项的图像进行筛选

标签

按带(或不带)的图像过滤,如果是Label!= [...] 是使用的)指定的标签。

舱单

按清单列表中的图像进行筛选。

只读

按只读或读/写图像过滤。

参考文献

按图像名称过滤。

之后/自

按在给定图像(名称或标签)之后创建的图像进行过滤。

直到

根据创建的图像进行筛选,直到指定的持续时间或时间。

The id filter accepts the image ID string.

The before filter accepts formats: <image-name>[:<tag>], <image id> or <image@digest>.

The containers filter shows images that have a running container based on that image.

The dangling filter shows images that are taking up disk space and serve no purpose. Dangling image is a file system layer that was used in a previous build of an image and is no longer referenced by any image. They are denoted with the <none> tag, consume disk space and serve no active purpose.

The digest filter accepts the image digest string.

The intermediate filter shows images that are dangling and have no children.

The label filter accepts two formats. One is the label=key or label=key=value, which shows images with the specified labels. The other format is the label!=key or label!=key=value, which shows images without the specified labels.

The manifest filter shows images that are manifest lists.

The readonly filter shows, as a default, both read-only and read/write images. Read-only images can be configured by modifying the additionalimagestores in the /etc/containers/storage.conf file.

The reference filter accepts the pattern of an image reference <image-name>[:<tag>].

The after or since filter accepts formats: <image-name>[:<tag>], <image id> or <image@digest>.

The until filter accepts formats: golang duration, RFC3339 time, or a Unix timestamp and shows all images that are created until that time.

--format = 格式化

更改默认输出格式。这可以是受支持的类型,如‘json’或GO模板。下面列出了GO模板的有效占位符:

Placeholder

Description

.容器

使用此图像的容器数量

.已创建

自创建映像以来经过的时间

.创建时间

创建映像的时间,YYYY-MM-DD HH:MM:SS+nnnn

.已创建自

与。相同。已创建

.创建时间

与.CreatedAt相同

.当玲

与.IsDangling相同

.摘要

图像摘要

.历史

图像层的历史

.id

图像ID(截断)

.id

映像ID(完整SHA)

.Isdangling

形象摇摆不定吗?(真/假)

.IsReadOnly

Unage是只读的吗?(真/假)

.Labels..。

标签的Map[]

.名称

图像FQIN

.ParentID

父映像ID的完整SHA,或空(字符串)

.只读

与.IsReadOnly相同

.RepoDigest

零个或多个repo/name@sha256的map[]:sha字符串

.存储库

图像库

.RepoTag

此图像的零个或多个FQIN字符串的map[]

.SharedSize

似乎始终为0

.Size

磁盘上层的大小(人类友好的字符串)

.标签

图像标签

.虚拟大小

磁盘上层的大小(字节)

--history

显示图像名称的历史记录。如果图像被重新标记或取消标记,则会将图像名称历史记录放在前面(最新的图像优先)。当撤消标记操作或图像不包含任何名称时,这尤其有用,因为它已取消标记。

--no-trunc

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

--noheading-n

从列表中省略表格标题。

--quiet-q

仅列出图像ID。

--sort = sort

按.分类 createdidrepositorysizetag (默认: created )

EXAMPLE

列出本地存储中的所有非悬挂映像:

$ podman images
REPOSITORY                         TAG         IMAGE ID      CREATED       SIZE
quay.io/podman/stable              latest      e0b7dabc3352  22 hours ago  331 MB
docker.io/library/alpine           latest      9c6f07244728  5 days ago    5.83 MB
registry.fedoraproject.org/fedora  latest      2ecb6df95994  3 weeks ago   169 MB
quay.io/libpod/testimage           20220615    f26aa69bb3f3  2 months ago  8.4 MB

列出与指定名称匹配的所有图像:

$ podman images stable
REPOSITORY             TAG         IMAGE ID      CREATED       SIZE
quay.io/podman/stable  latest      e0b7dabc3352  22 hours ago  331 MB

列出容器存储中所有镜像的镜像ID:

# podman image ls --quiet
e3d42bcaf643
ebb91b73692b
4526339ae51c

列出所有图像,但不显示标题:

# podman images --noheading
docker.io/kubernetes/pause                   latest   e3d42bcaf643   3 years ago   251 kB
<none>                                       <none>   ebb91b73692b   4 weeks ago   27.2 MB
docker.io/library/ubuntu                     latest   4526339ae51c   6 weeks ago   126 MB

列出所有图像,但不截断输出:

# podman image list --no-trunc
REPOSITORY                                   TAG      IMAGE ID                                                                  CREATED       SIZE
docker.io/kubernetes/pause                   latest   sha256:e3d42bcaf643097dd1bb0385658ae8cbe100a80f773555c44690d22c25d16b27   3 years ago   251 kB
<none>                                       <none>   sha256:ebb91b73692bd27890685846412ae338d13552165eacf7fcd5f139bfa9c2d6d9   4 weeks ago   27.2 MB
docker.io/library/ubuntu                     latest   sha256:4526339ae51c3cdc97956a7a961c193c39dfc6bd9733b0d762a36c6881b5583a   6 weeks ago   126 MB

列出带有格式化内容的所有图像内容:

# podman images --format "table {{.ID}} {{.Repository}} {{.Tag}}"
IMAGE ID       REPOSITORY                                   TAG
e3d42bcaf643   docker.io/kubernetes/pause                   latest
ebb91b73692b   <none>                                       <none>
4526339ae51c   docker.io/library/ubuntu                     latest

列出所有未标记名称的图像(悬挂):

# podman images --filter dangling=true
REPOSITORY   TAG      IMAGE ID       CREATED       SIZE
<none>       <none>   ebb91b73692b   4 weeks ago   27.2 MB

以JSON格式列出所有图片:

# podman images --format json
[
    {
	"id": "e3d42bcaf643097dd1bb0385658ae8cbe100a80f773555c44690d22c25d16b27",
	"names": [
	    "docker.io/kubernetes/pause:latest"
	],
	"digest": "sha256:0aecf73ff86844324847883f2e916d3f6984c5fae3c2f23e91d66f549fe7d423",
	"created": "2014-07-19T07:02:32.267701596Z",
	"size": 250665
    },
    {
	"id": "ebb91b73692bd27890685846412ae338d13552165eacf7fcd5f139bfa9c2d6d9",
	"names": [
	    "\u003cnone\u003e"
	],
	"digest": "sha256:ba7e4091d27e8114a205003ca6a768905c3395d961624a2c78873d9526461032",
	"created": "2017-10-26T03:07:22.796184288Z",
	"size": 27170520
    },
    {
	"id": "4526339ae51c3cdc97956a7a961c193c39dfc6bd9733b0d762a36c6881b5583a",
	"names": [
	    "docker.io/library/ubuntu:latest"
	],
	"digest": "sha256:193f7734ddd68e0fb24ba9af8c2b673aecb0227b026871f8e932dab45add7753",
	"created": "2017-10-10T20:59:05.10196344Z",
	"size": 126085200
    }
]

列出按指定列排序的所有图像:

# podman images --sort repository
REPOSITORY                                   TAG      IMAGE ID       CREATED       SIZE
<none>                                      <none>   2460217d76fc   About a minute ago   4.41 MB
docker.io/library/alpine                    latest   3fd9065eaf02   5 months ago         4.41 MB
localhost/myapp                             latest   b2e0ad03474a   About a minute ago   4.41 MB
registry.access.redhat.com/rhel7            latest   7a840db7f020   2 weeks ago          211 MB
registry.fedoraproject.org/fedora           27       801894bc0e43   6 weeks ago          246 MB

显示列出的正在使用的图像与所有图像(包括悬挂图像)之间的差异:

# podman images
REPOSITORY                 TAG      IMAGE ID       CREATED         SIZE
localhost/test             latest   18f0c080cd72   4 seconds ago   4.42 MB
docker.io/library/alpine   latest   3fd9065eaf02   5 months ago    4.41 MB
# podman images -a
REPOSITORY                 TAG      IMAGE ID       CREATED         SIZE
localhost/test             latest   18f0c080cd72   6 seconds ago   4.42 MB
<none>                     <none>   270e70dc54c0   7 seconds ago   4.42 MB
<none>                     <none>   4ed6fbe43414   8 seconds ago   4.41 MB
<none>                     <none>   6b0df8e71508   8 seconds ago   4.41 MB
docker.io/library/alpine   latest   3fd9065eaf02   5 months ago    4.41 MB

另请参阅

[podman(1)] , [containers-storage.conf(5)]

HISTORY

2017年3月,最初由丹·沃尔什汇编 <dwalsh@redhat.com>