名称

podman-artifact-pull - 从 registry 中拉取 artifact 并将其存储到本地

简介

podman artifact pull [options] source

描述

podman artifact pull 将 artifact 从 registry 复制到本地机器。

SOURCE

SOURCE 是获取 artifact 镜像的位置。

# Pull from a registry
$ podman artifact pull quay.io/foobar/artifact:special

选项

--authfile=path

认证文件的路径。在 Linux 上默认是 ${XDG_RUNTIME_DIR}/containers/auth.json,在 Windows/macOS 上是 $HOME/.config/containers/auth.json。该文件由 podman login 创建。如果在此处找不到授权状态,则会检查 $HOME/.docker/config.json,该文件是使用 docker login 设置的。

注意:还可以通过设置 REGISTRY_AUTH_FILE 环境变量来覆盖认证文件的默认路径。这可以通过 export REGISTRY_AUTH_FILE=path 来完成。

--cert-dir=path

使用 path (*.crt, *.cert, *.key) 中的证书连接到 registry。(默认值:/etc/containers/certs.d)有关详细信息,请参阅 containers-certs.d(5)。(此选项不适用于远程 Podman 客户端,包括 Mac 和 Windows(不包括 WSL2)机器)

--creds=[username[:password]]

用于向镜像仓库进行身份验证的 [username[:password]](如果需要)。如果未提供一个或两个值,则会出现命令行提示,可以输入该值。密码输入时无回显。

请注意,指定的凭据仅用于对目标 registry 进行身份验证。它们不用于镜像或当 registry 被重写时(请参阅 containers-registries.conf(5));要对这些进行身份验证,请考虑使用 containers-auth.json(5) 文件。

--decryption-key=key[:passphrase]

用于解密镜像的 [key[:passphrase]]。Key 可以指向密钥和/或证书。会尝试使用所有密钥进行解密。如果密钥受密码短语保护,则必须在参数中传递它,否则省略。

--help, -h

打印用法说明。

--quiet, -q

拉取镜像时抑制输出信息

--retry=attempts

在仓库和本地存储之间拉取或推送镜像失败时重试的次数。默认为 3

--retry-delay=duration

在拉取或推送 registry 和本地存储之间的镜像时,如果失败,重试尝试之间的延迟时间。默认是从两秒开始,然后指数退避。当设置此值时,将使用延迟,并且不会发生指数退避。

--tls-verify

在联系 registry 时要求 HTTPS 并验证证书(默认值:true)。如果明确设置为 true,则使用 TLS 验证。如果设置为 false,则不使用 TLS 验证。如果未指定,除非目标 registry 在 containers-registries.conf(5) 中被列为不安全 registry,否则将使用 TLS 验证。

文件

示例

从 registry 拉取 artifact

podman artifact pull quay.io/baude/artifact:josey
Getting image source signatures
Copying blob e741c35a27bb done   |
Copying config 44136fa355 done   |
Writing manifest to image destination

另请参阅

podman(1)podman-artifact(1)podman-login(1)containers-certs.d(5)

故障排除

有关常见问题的解决方案,请参阅 podman-troubleshooting(7)

历史

2025 年 1 月,最初由 Brent Baude bbaude@redhat.com 编译