{"id":18734501,"url":"https://github.com/wise2c-devops/wise-crane","last_synced_at":"2025-08-09T15:07:16.463Z","repository":{"id":226765910,"uuid":"769592049","full_name":"wise2c-devops/wise-crane","owner":"wise2c-devops","description":"基于谷歌容器镜像工具crane优化的脚本，针对只需要处理amd64和aarch64两种架构的场景","archived":false,"fork":false,"pushed_at":"2024-03-10T12:35:15.000Z","size":4026,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-28T16:21:38.098Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wise2c-devops.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-09T14:11:54.000Z","updated_at":"2024-03-10T12:29:57.000Z","dependencies_parsed_at":"2024-03-09T15:28:17.680Z","dependency_job_id":"aa874e3f-1a03-40dd-b9ab-7c76fbfd045b","html_url":"https://github.com/wise2c-devops/wise-crane","commit_stats":null,"previous_names":["wise2c-devops/wise-crane"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wise2c-devops%2Fwise-crane","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wise2c-devops%2Fwise-crane/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wise2c-devops%2Fwise-crane/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wise2c-devops%2Fwise-crane/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wise2c-devops","download_url":"https://codeload.github.com/wise2c-devops/wise-crane/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239606240,"owners_count":19667198,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T15:13:34.836Z","updated_at":"2025-02-19T06:22:57.676Z","avatar_url":"https://github.com/wise2c-devops.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# wise-crane\n将多架构统一镜像高效的迁移至私有环境的镜像仓库例如Harbor，采用标准的docker命令非常复杂，谷歌因此推出了[Crane](https://github.com/google/go-containerregistry/tree/main/cmd/crane)开源小工具，非常便捷。\n\n不过我们平常并不需要针对所有架构进行统一标签的处理，更多时候我们只关心x86/amd64和arm/aarch64两种架构。如果直接基于crane工具进行镜像转移，则会下载很多不必要的镜像层。\n\n该程序基于谷歌容器镜像工具crane优化的脚本，针对只需要处理amd64和aarch64两种架构的场景。\n\n![crane](https://github.com/wise2c-devops/wise-crane/assets/3273357/6bfe09ff-fd74-403c-88aa-9f265e64129c)\n\nUsage: /usr/local/bin/mycrane.sh \u003cpull|push|manifest\u003e \u003cregistry_image|tarfile\u003e [\u003ctarfile|registry_image\u003e]\n\ne.g.: \n\n      /usr/local/bin/mycrane.sh pull grafana/grafana:10.4.0 grafana-10.4.0.tar\n\n      /usr/local/bin/mycrane.sh push grafana-10.4.0.tar 192.168.0.1/library/grafana:10.4.0\n\n      /usr/local/bin/mycrane.sh manifest 192.168.0.1/library/grafana:10.4.0\n\n      /usr/local/bin/mycrane.sh manifest grafana-10.4.0.tar\n\n\n命令用法：/usr/local/bin/mycrane.sh \u003cpull|push|manifest\u003e \u003c镜像名|tar压缩包文件\u003e [\u003ctar压缩包文件|镜像名\u003e]\n\n例如：\n\n      /usr/local/bin/mycrane.sh pull grafana/grafana:10.4.0 grafana-10.4.0.tar\n\n      /usr/local/bin/mycrane.sh push grafana-10.4.0.tar 192.168.0.1/library/grafana:10.4.0\n\n      /usr/local/bin/mycrane.sh manifest 192.168.0.1/library/grafana:10.4.0\n\n      /usr/local/bin/mycrane.sh manifest grafana-10.4.0.tar\n\n![Screenshot01](https://github.com/wise2c-devops/wise-crane/assets/3273357/98bebde2-3c60-488d-a2e8-f0591d8a7f6a)\n\n![Screenshot02](https://github.com/wise2c-devops/wise-crane/assets/3273357/c35c82c0-c246-40d7-bfc0-cf9e3998de14)\n\n![Screenshot03](https://github.com/wise2c-devops/wise-crane/assets/3273357/94ac69ba-30bd-4dea-a17f-00b61b9afa83)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwise2c-devops%2Fwise-crane","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwise2c-devops%2Fwise-crane","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwise2c-devops%2Fwise-crane/lists"}