NAME¶ 名称
podman-manifest - Create and manipulate manifest lists and image indexes
podman-manifest - 创建和操作清单列表和镜像索引
SYNOPSIS¶ 概要
podman manifest subcommand
podman manifest 子命令
DESCRIPTION¶ 描述
The podman manifest command provides subcommands which can be used to:
podman manifest 命令提供子命令,可用于:
* Create a working Docker manifest list or OCI image index.
SUBCOMMANDS¶ 子命令 ¶
Command |
Man Page 手册页 |
Description |
|---|---|---|
add |
Add an image or artifact to a manifest list or image index. |
|
annotate |
Add and update information about an image or artifact in a manifest list or image index. |
|
create |
Create a manifest list or image index. |
|
exists |
Check if the given manifest list exists in local storage |
|
inspect |
Display a manifest list or image index. |
|
push |
Push a manifest list or image index to a registry. |
|
remove |
Remove an image from a manifest list or image index. |
|
rm |
Remove manifest list or image index from local storage. |
EXAMPLES¶ 示例
Building a multi-arch manifest list from a Containerfile¶
从 Containerfile 构建多架构清单列表 ¶
Assuming the Containerfile uses RUN instructions, the host needs
a way to execute non-native binaries. Configuring this is beyond
the scope of this example. Building a multi-arch manifest list
shazam in parallel across 4-threads can be done like this:
假设 Containerfile 使用 RUN 指令,主机需要一种执行非本机二进制文件的方法。配置这一点超出了本示例的范围。可以像这样同时在 4 个线程中构建多架构清单列表 shazam :
$ platarch=linux/amd64,linux/ppc64le,linux/arm64,linux/s390x
$ podman build --jobs=4 --platform=$platarch --manifest shazam .
Note: The --jobs argument is optional. Do not use the podman build command’s --tag (or -t) option when building a multi-arch manifest list.
注意: --jobs 参数是可选的。在构建多架构清单列表时,请勿使用 podman build 命令的 --tag (或 -t )选项。
Assembling a multi-arch manifest from separately built images¶
从单独构建的图像组装多架构清单 ¶
Assuming example.com/example/shazam:$arch images are built separately
on other hosts and pushed to the example.com registry. They may
be combined into a manifest list, and pushed using a simple loop:
假设 example.com/example/shazam:$arch 图像是在其他主机上单独构建并推送到 example.com 注册表的。它们可以合并为清单列表,并使用简单的循环推送:
$ REPO=example.com/example/shazam
$ podman manifest create $REPO:latest
$ for IMGTAG in amd64 s390x ppc64le arm64; do \
podman manifest add $REPO:latest docker://$REPO:IMGTAG; \
done
$ podman manifest push --all $REPO:latest
Note: The add instruction argument order is <manifest> then <image>.
Also, the --all push option is required to ensure all contents are
pushed, not just the native platform/arch.
注意: add 指令参数顺序是 <manifest> 然后 <image> 。此外,需要使用 --all 推送选项来确保所有内容都被推送,而不仅仅是本地平台/架构。
Removing and tagging a manifest list before pushing¶
在推送之前删除和标记清单列表
Special care is needed when removing and pushing manifest lists, as opposed
to the contents. You almost always want to use the manifest rm and
manifest push --all subcommands. For example, a rename and push can
be performed like this:
在删除和推送清单列表时需要特别小心,与内容相反。您几乎总是希望使用 manifest rm 和 manifest push --all 子命令。例如,可以像这样执行重命名和推送:
$ podman tag localhost/shazam example.com/example/shazam
$ podman manifest rm localhost/shazam
$ podman manifest push --all example.com/example/shazam
SEE ALSO¶ 参见 ¶
podman(1), podman-manifest-add(1), podman-manifest-annotate(1), podman-manifest-create(1), podman-manifest-inspect(1), podman-manifest-push(1), podman-manifest-remove(1)