Linux command
regctl 命令
文件
复制后可按需替换文件名、目录或参数。
常用示例
List tags for an image
regctl tag ls [registry/image]
Inspect an image
regctl image inspect [registry/image:tag]
Copy an image
regctl image copy [source/image:tag] [dest/image:tag]
Get image digest
regctl image digest [registry/image:tag]
Delete a tag
regctl tag rm [registry/image:tag]
Export an image to OCI layout
regctl image export [registry/image:tag] [output.tar]
List repositories
regctl repo ls [registry]
Check Docker Hub rate limits
regctl registry ratelimit docker.io
说明
regctl is a CLI tool for interacting with OCI-compliant container registries without requiring a container runtime or privileged access. It provides efficient image operations by working directly with registry APIs. The tool excels at copying images between registries, transferring only layers that don't exist at the destination. This makes it efficient for mirroring, promoting images between environments, or synchronizing across air-gapped systems. Regctl supports multi-platform images, OCI artifacts, and can work with OCI Layout directories as local registry equivalents. It automatically imports credentials from Docker CLI configuration. Common workflows include inspecting remote images, copying between registries, managing tags, checking rate limits, and exporting/importing images for offline transfer.
参数
- image inspect _ref_
- Display image configuration and metadata
- image copy _src_ _dest_
- Copy image between registries (efficient layer reuse)
- image digest _ref_
- Get image digest
- image export _ref_ _file_
- Export image to tar file (OCI or Docker format)
- image import _ref_ _file_
- Import image from tar file
- tag ls _repository_
- List tags in a repository
- tag rm _ref_
- Delete a tag from registry
- repo ls _registry_
- List repositories in a registry
- manifest get _ref_
- Get raw manifest content
- manifest put _ref_
- Upload manifest to registry
- blob get _ref_
- Download blob content
- registry login _registry_
- Authenticate with a registry
- registry ratelimit _registry_
- Check rate limit status for a registry
- --platform _os/arch_
- Filter by platform (e.g., linux/amd64, linux/arm64)
- --format _template_
- Output format (Go template)
- -v, --verbosity _level_
- Set logging verbosity
FAQ
What is the regctl command used for?
regctl is a CLI tool for interacting with OCI-compliant container registries without requiring a container runtime or privileged access. It provides efficient image operations by working directly with registry APIs. The tool excels at copying images between registries, transferring only layers that don't exist at the destination. This makes it efficient for mirroring, promoting images between environments, or synchronizing across air-gapped systems. Regctl supports multi-platform images, OCI artifacts, and can work with OCI Layout directories as local registry equivalents. It automatically imports credentials from Docker CLI configuration. Common workflows include inspecting remote images, copying between registries, managing tags, checking rate limits, and exporting/importing images for offline transfer.
How do I run a basic regctl example?
Run `regctl tag ls [registry/image]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does image inspect _ref_ do in regctl?
Display image configuration and metadata