crane

容器镜像搬运与检查工具

补充说明

crane 是 go-containerregistry 提供的命令行工具,直接操作 registry 中的镜像、manifest 和 layer,不需要 Docker daemon。适合 CI 中的复制、打标签和检查。

常用示例

crane auth login registry.example.com -u user -p "$PASSWORD"
crane ls registry.example.com/app
crane digest registry.example.com/app:1.0
crane manifest registry.example.com/app:1.0
crane config registry.example.com/app:1.0
crane pull registry.example.com/app:1.0 app.tar
crane push app.tar registry.example.com/app:1.0
crane copy registry.example.com/app:1.0 registry.example.com/app:stable
crane tag registry.example.com/app:1.0 stable
crane delete registry.example.com/app:old
crane validate --remote registry.example.com/app:1.0

易错点与排错

相关命令