← 返回命令列表

Linux command

crane-push 命令

文件

复制后可按需替换文件名、目录或参数。

常用示例

Push tarball

crane push [image.tar] [registry/repo:tag]

Push

crane push [image.tar] [registry/repo:tag] --image-refs [refs.txt]

Push

crane push [image.tar] [registry/repo:tag] --index

说明

crane push uploads a tarball as a container image to a registry. The tarball should be in OCI or Docker image format (as produced by crane pull, docker save, or crane export). The command reads the image layers from the tarball and pushes them to the target repository, then uploads the manifest. Authentication uses the same Docker credentials configured in ~/.docker/config.json.

参数

--image-refs _file_
Path to write the full image reference (including digest) by tag.
--index
Push a collection of images as a single index (manifest list).
--platform _os/arch_
Specify platform when pushing a multi-platform tarball.

FAQ

What is the crane-push command used for?

crane push uploads a tarball as a container image to a registry. The tarball should be in OCI or Docker image format (as produced by crane pull, docker save, or crane export). The command reads the image layers from the tarball and pushes them to the target repository, then uploads the manifest. Authentication uses the same Docker credentials configured in ~/.docker/config.json.

How do I run a basic crane-push example?

Run `crane push [image.tar] [registry/repo:tag]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --image-refs _file_ do in crane-push?

Path to write the full image reference (including digest) by tag.