1 Star 0 Fork 0

Darkness / hub-mirror

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

hub-mirror

使用 docker.io (hub.docker.com) 或其它国内镜像仓库来提供(但不限于) gcr.io、registry.k8s.io、k8s.gcr.io、quay.io、ghcr.io 等国外镜像加速下载服务

最近更新:

  • 转换脚本提供 dockerctr(containerd)命令
  • 支持切换 arm 架构,参考:默认架构arm架构

为减少重复请求,合理利用资源,建议提前在 issues 中搜索镜像是否已转换过

示例:issues搜索registry.k8s.io/kube-apiserver:v1.27.4

原理

无法拉取 gcr.io 镜像?用魔法来打败魔法

更多云原生技术可关注微信公众号:【gopher云原生】

开始使用

用法一:白嫖我的,点个 Star ,直接提交 issues ,按照 issue 模板修改内容即可

要求:严格按照模板规范提交,参考: 成功案例

当任务失败时,可以查看失败原因并直接修改 issues 的内容,即可重新触发任务执行

限制:每次提交最多 11 个镜像地址(为啥是11个?因为我的第一次需求刚好要转换11个镜像🤣)

本人 Docker 账号有每日镜像拉取限额,请勿滥用

用法二:自己动手,Fork 本项目,绑定你自己的 DockerHub 账号或其他镜像服务账号

  1. 绑定账号

    • 如果要使用默认的 hub.docker.com 镜像服务

      Settings-Secrets and variables-Actions 选择 New repository secret 新建 DOCKER_USERNAME(你的 Docker 用户名) 和 DOCKER_TOKEN(你的 Docker 密码) 两个 Secrets

    • 如果需要使用其它镜像服务,例如腾讯云、阿里云等

      Settings-Secrets and variables-Actions 选择 New repository secret 新建 DOCKER_USERNAME(你的其它镜像服务用户名) 和 DOCKER_TOKEN(你的其它镜像服务密码)以及 DOCKER_REPOSITORY 三个 Secrets

      其中 DOCKER_REPOSITORY 配置例子:

      • 腾讯云: ccr.ccs.tencentyun.com/xxxxxx
      • 阿里云: registry.cn-hangzhou.aliyuncs.com/xxxxxx
  2. 在 Fork 的项目中开启 Settings-General-Features 中的 Issues 功能

  3. 在 Fork 的项目中修改 Settings-Actions-General 中的 Workflow permissionsRead and write permissions

  4. Issues-Labels 选择 New label 依次添加三个 label :hub-mirrorsuccessfailure

  5. Actions 里选择 hub-mirror ,在右边 ··· 菜单里选择 Enable Workflow

  6. 在 Fork 的项目中提交 issues

MIT License Copyright (c) 2022 togettoyou Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

暂无描述 展开 收起
Go
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/abigdreamer/hub-mirror.git
git@gitee.com:abigdreamer/hub-mirror.git
abigdreamer
hub-mirror
hub-mirror
main

搜索帮助

344bd9b3 5694891 D2dac590 5694891