https://github.com/wise2c-devops/wise-crane
基于谷歌容器镜像工具crane优化的脚本,针对只需要处理amd64和aarch64两种架构的场景
https://github.com/wise2c-devops/wise-crane
Last synced: 11 months ago
JSON representation
基于谷歌容器镜像工具crane优化的脚本,针对只需要处理amd64和aarch64两种架构的场景
- Host: GitHub
- URL: https://github.com/wise2c-devops/wise-crane
- Owner: wise2c-devops
- License: apache-2.0
- Created: 2024-03-09T14:11:54.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-10T12:35:15.000Z (over 2 years ago)
- Last Synced: 2024-12-28T16:21:38.098Z (over 1 year ago)
- Language: Shell
- Size: 3.84 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# wise-crane
将多架构统一镜像高效的迁移至私有环境的镜像仓库例如Harbor,采用标准的docker命令非常复杂,谷歌因此推出了[Crane](https://github.com/google/go-containerregistry/tree/main/cmd/crane)开源小工具,非常便捷。
不过我们平常并不需要针对所有架构进行统一标签的处理,更多时候我们只关心x86/amd64和arm/aarch64两种架构。如果直接基于crane工具进行镜像转移,则会下载很多不必要的镜像层。
该程序基于谷歌容器镜像工具crane优化的脚本,针对只需要处理amd64和aarch64两种架构的场景。

Usage: /usr/local/bin/mycrane.sh []
e.g.:
/usr/local/bin/mycrane.sh pull grafana/grafana:10.4.0 grafana-10.4.0.tar
/usr/local/bin/mycrane.sh push grafana-10.4.0.tar 192.168.0.1/library/grafana:10.4.0
/usr/local/bin/mycrane.sh manifest 192.168.0.1/library/grafana:10.4.0
/usr/local/bin/mycrane.sh manifest grafana-10.4.0.tar
命令用法:/usr/local/bin/mycrane.sh <镜像名|tar压缩包文件> []
例如:
/usr/local/bin/mycrane.sh pull grafana/grafana:10.4.0 grafana-10.4.0.tar
/usr/local/bin/mycrane.sh push grafana-10.4.0.tar 192.168.0.1/library/grafana:10.4.0
/usr/local/bin/mycrane.sh manifest 192.168.0.1/library/grafana:10.4.0
/usr/local/bin/mycrane.sh manifest grafana-10.4.0.tar


