NAME 名称

podman-manifest-add - Add an image or artifact to a manifest list or image index
podman-manifest-add - 将图像或工件添加到清单列表或图像索引

SYNOPSIS 概要

podman manifest add [options] listnameorindexname [transport]:imagename imageorartifactname […]
podman manifest add [选项] listnameorindexname [传输]:imagename imageorartifactname […]

DESCRIPTION 描述

Adds the specified image to the specified manifest list or image index, or creates an artifact manifest and adds it to the specified image index.
将指定的图像添加到指定的清单列表或图像索引,或创建一个工件清单并将其添加到指定的图像索引。

RETURN VALUE 返回值 ¶

The list image’s ID.
列表图像的 ID。

OPTIONS 选项

--all

If the image which is added to the list or index is itself a list or index, add all of the contents to the local list. By default, only one image from such a list or index is added to the list or index. Combining --all with any of the other options described below is NOT recommended.
如果添加到列表或索引的图像本身是一个列表或索引,则将所有内容添加到本地列表中。默认情况下,只会将这样的列表或索引中的一个图像添加到列表或索引中。不建议将--all 与下面描述的任何其他选项结合使用。

--annotation=annotation=value
--annotation=注释=值 ¶

Set an annotation on the entry for the specified image or artifact.
在指定的图像或工件条目上设置注释。

--arch=architecture

Override the architecture which the list or index records as a requirement for the image. If imageName refers to a manifest list or image index, the architecture information is retrieved from it. Otherwise, it is retrieved from the image’s configuration information.
覆盖列表或索引记录的体系结构,作为图像的要求。如果 imageName 指的是清单列表或图像索引,则从中检索体系结构信息。否则,将从图像的配置信息中检索。

--artifact --工件 ¶

Create an artifact manifest and add it to the image index. Arguments after the index name will be interpreted as file names rather than as image references. In most scenarios, the --artifact-type option should also be specified.
创建一个工件清单并将其添加到镜像索引中。索引名称后面的参数将被解释为文件名,而不是镜像引用。在大多数情况下,还应该指定 --工件类型 选项。

--artifact-config=path --工件配置=路径 ¶

When creating an artifact manifest and adding it to the image index, use the specified file’s contents as the configuration blob in the artifact manifest. In most scenarios, leaving the default value, which signifies an empty configuration, unchanged, is the preferred option.
在创建工件清单并将其添加到镜像索引时,使用指定文件的内容作为工件清单中的配置 blob。在大多数情况下,保持默认值不变,即表示空配置,是首选选项。

--artifact-config-type=type

When creating an artifact manifest and adding it to the image index, use the specified MIME type as the mediaType associated with the configuration blob in the artifact manifest. In most scenarios, leaving the default value, which signifies either an empty configuration or the standard OCI configuration type, unchanged, is the preferred option.
在创建工件清单并将其添加到镜像索引时,使用指定的 MIME 类型作为与工件清单中的配置 blob 关联的 mediaType 。在大多数情况下,保持默认值不变,即表示空配置或标准 OCI 配置类型,是首选选项。

--artifact-exclude-titles

When creating an artifact manifest and adding it to the image index, do not set “org.opencontainers.image.title” annotations equal to the file’s basename for each file added to the artifact manifest. Tools which retrieve artifacts from a registry may use these values to choose names for files when saving artifacts to disk, so this option is not recommended unless it is required for interoperability with a particular registry.
在创建工件清单并将其添加到镜像索引时,不要将“org.opencontainers.image.title”注释设置为每个添加到工件清单的文件的基本名称。从注册表中检索工件的工具可能会使用这些值来选择文件的名称,因此除非与特定注册表的互操作性需要,否则不建议使用此选项。

--artifact-layer-type=type

When creating an artifact manifest and adding it to the image index, use the specified MIME type as the mediaType associated with the files’ contents. If not specified, guesses based on either the files names or their contents will be made and used, but the option should be specified if certainty is needed.
在创建工件清单并将其添加到镜像索引时,使用指定的 MIME 类型作为与文件内容关联的 mediaType 。如果未指定,则将根据文件名称或其内容进行猜测并使用,但如果需要确定性,则应指定该选项。

--artifact-subject=imageName

When creating an artifact manifest and adding it to the image index, set the subject field in the artifact manifest to mark the artifact manifest as being associated with the specified image in some way. An artifact manifest can only be associated with, at most, one subject.
在创建工件清单并将其添加到镜像索引时,在工件清单中设置主题字段,以标记工件清单与某种方式关联的指定图像。工件清单最多只能与一个主题关联。

--artifact-type=type --artifact-type=类型 ¶

When creating an artifact manifest, use the specified MIME type as the manifest’s artifactType value instead of the less informative default value.
在创建工件清单时,使用指定的 MIME 类型作为清单的 artifactType 值,而不是不太具信息性的默认值。

--authfile=path

Path of the authentication file. Default is ${XDG_RUNTIME_DIR}/containers/auth.json on Linux, and $HOME/.config/containers/auth.json on Windows/macOS. The file is created by podman login. If the authorization state is not found there, $HOME/.docker/config.json is checked, which is set using docker login.
认证文件的路径。在 Linux 上默认为 ${XDG_RUNTIME_DIR}/containers/auth.json ,在 Windows/macOS 上默认为 $HOME/.config/containers/auth.json 。该文件由 podman login 创建。如果授权状态未在那里找到,则会检查 $HOME/.docker/config.json ,该值是使用 docker login 设置的。

Note: There is also the option to override the default path of the authentication file by setting the REGISTRY_AUTH_FILE environment variable. This can be done with export REGISTRY_AUTH_FILE=path.
注意:还有一种选择,可以通过设置 REGISTRY_AUTH_FILE 环境变量来覆盖认证文件的默认路径。可以通过 export REGISTRY_AUTH_FILE=path 来实现。

--cert-dir=path

Use certificates at path (*.crt, *.cert, *.key) to connect to the registry. (Default: /etc/containers/certs.d) For details, see containers-certs.d(5). (This option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines)
使用证书路径(*.crt, *.cert, *.key)连接到注册表。 (默认值:/etc/containers/certs.d)有关详细信息,请参阅 containers-certs.d(5)。 (此选项不适用于远程 Podman 客户端,包括 Mac 和 Windows(不包括 WSL2)机器)

--creds=[username[:password]]
--creds=[用户名[:密码]] ¶

The [username[:password]] to use to authenticate with the registry, if required. If one or both values are not supplied, a command line prompt appears and the value can be entered. The password is entered without echo.
如果需要,用于与注册表进行身份验证的[用户名[:密码]]。如果一个或两个值未提供,将出现命令行提示,并可以输入该值。密码输入时不会显示。

Note that the specified credentials are only used to authenticate against target registries. They are not used for mirrors or when the registry gets rewritten (see containers-registries.conf(5)); to authenticate against those consider using a containers-auth.json(5) file.
请注意,指定的凭据仅用于对目标注册表进行身份验证。它们不用于镜像或注册表被重写时(请参阅 containers-registries.conf(5) );要对其进行身份验证,请考虑使用 containers-auth.json(5) 文件。

--features=feature --features=特性 ¶

Specify the features list which the list or index records as requirements for the image. This option is rarely used.
指定要求图像的特性列表,该列表或索引记录为图像的要求。此选项很少使用。

--os=OS --os=操作系统 ¶

Override the OS which the list or index records as a requirement for the image. If imagename refers to a manifest list or image index, the OS information is retrieved from it. Otherwise, it is retrieved from the image’s configuration information.
覆盖列表或索引记录为图像要求的操作系统。如果 imagename 指的是清单列表或图像索引,则从中检索操作系统信息。否则,将从图像的配置信息中检索。

--os-version=version --os-version=版本 ¶

Specify the OS version which the list or index records as a requirement for the image. This option is rarely used.
指定列表或索引记录为图像要求的操作系统版本。此选项很少使用。

--tls-verify

Require HTTPS and verify certificates when contacting registries (default: true). If explicitly set to true, TLS verification is used. If set to false, TLS verification is not used. If not specified, TLS verification is used unless the target registry is listed as an insecure registry in containers-registries.conf(5)
在联系注册表时需要 HTTPS 并验证证书(默认值为 true)。如果显式设置为 true,则使用 TLS 验证。如果设置为 false,则不使用 TLS 验证。如果未指定,则除非目标注册表在 containers-registries.conf(5) 中被列为不安全注册表,否则将使用 TLS 验证。

--variant --变体 ¶

Specify the variant which the list or index records for the image. This option is typically used to distinguish between multiple entries which share the same architecture value, but which expect different versions of its instruction set.
指定列表或索引记录图像的变体。此选项通常用于区分共享相同架构值但期望其指令集的不同版本的多个条目。

Transport 传输

Multiple transports are supported:
支持多种传输方式:

docker://docker-reference (default) An image in a registry implementing the “Docker Registry HTTP API V2”. By default, uses the authorization state in $XDG_RUNTIME_DIR/containers/auth.json, which is set using (podman login). If the authorization state is not found there, $HOME/.docker/config.json is checked, which is set using (docker login).
docker://docker-reference(默认)一个在实现“Docker Registry HTTP API V2”的注册表中的镜像。默认情况下,使用 $XDG_RUNTIME_DIR/containers/auth.json 中设置的授权状态,该状态是使用 (podman login) 设置的。如果在那里找不到授权状态,则会检查 $HOME/.docker/config.json ,该状态是使用 (docker login) 设置的。

$ podman manifest add mylist:v1.11 docker://quay.io/username/myimage

containers-storage:oci-reference An image in oci-reference format stored in the local container storage. oci-reference must contain a tag.
containers-storage:oci-reference 存储在本地容器存储中以 oci-reference 格式的镜像。oci-reference 必须包含一个标签。

$ podman manifest add mylist:v1.11 containers-storage:quay.io/username/myimage

dir:path An existing local directory path storing the manifest, layer tarballs, and signatures as individual files. This is a non-standardized format, primarily useful for debugging or noninvasive container inspection.
dir:path 存储着清单、层 tarballs 和签名作为单独文件的现有本地目录路径。这是一种非标准化格式,主要用于调试或非侵入式容器检查。

$ podman manifest add dir:/tmp/myimage

docker-archive:path[:docker-reference] An image is stored in the docker save formatted file. docker-reference is only used when creating such a file, and it must not contain a digest.
docker-archive:path[:docker-reference] 图像存储在 docker save 格式的文件中。创建此类文件时仅使用 docker-reference,并且不得包含摘要。

$ podman manifest add docker-archive:/tmp/myimage

docker-daemon:docker-reference An image in docker-reference format stored in the docker daemon internal storage. The docker-reference can also be an image ID (docker-daemon:algo:digest).
docker-daemon:docker-reference 以 docker-reference 格式存储在 docker 守护程序内部存储中的图像。docker-reference 也可以是图像 ID(docker-daemon:algo:digest)。

$ sudo podman manifest add docker-daemon:docker.io/library/myimage:33

oci-archive:path:tag An image tag in a directory compliant with “Open Container Image Layout Specification” at path.
oci-archive:path:tag 在路径上符合“Open Container Image Layout Specification”规范的目录中的图像标签。

$ podman manifest add oci-archive:/tmp/myimage

EXAMPLE 例子 ¶

Add specified default image from source manifest list to destination manifest list:
将源清单列表中指定的默认图像添加到目标清单列表中:

podman manifest add mylist:v1.11 docker://fedora
71c201d10fffdcac52968a000d85a0a016ca1c7d5473948000d3131c1773d965

Add all images from source manfest list to destination manifest list:
将源清单列表中的所有图像添加到目标清单列表中:

podman manifest add --all mylist:v1.11 docker://fedora
71c201d10fffdcac52968a000d85a0a016ca1c7d5473948000d3131c1773d965

Add selected image matching arch and variant from source manifest list to destination manifest list:
将与源清单列表中的架构和变体匹配的选定图像添加到目标清单列表中:

podman manifest add --arch arm64 --variant v8 mylist:v1.11 docker://71c201d10fffdcac52968a000d85a0a016ca1c7d5473948000d3131c1773d965

SEE ALSO 参见 ¶

podman(1), podman-manifest(1)