Coder Social home page Coder Social logo

hub-mirror's Introduction

hub-mirror

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

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

示例:https://github.com/togettoyou/hub-mirror/issues?q=gcr.io%2Fgoogle-samples%2Fmicroservices-demo%2Femailservice%3Av0.3.5

原理

https://mp.weixin.qq.com/s/Vt0FRTx1PsoYFdLa0QZzWw

微信公众号:SuperGopher

go、云原生技术、项目问题、联系我 ...... 欢迎关注,来者不拒

开始使用

方案一:白嫖我的,点个 Star ,直接提交 issues

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

限制:每次提交最多 11 个镜像地址

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

方案二:自己动手,丰衣足食,Fork 本项目,绑定你自己的 DockerHub 账号或其他镜像服务账号

  1. 绑定账号

    • 如果要使用 DockerHub 的镜像服务

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

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

      Settings-Secrets-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

方案三:已有魔法,支持本地使用

$ go install github.com/togettoyou/hub-mirror@latest
$ hub-mirror --username=xxxxxx --password=xxxxxx --content='{ "hub-mirror": ["gcr.io/google-samples/microservices-demo/emailservice:v0.3.5","hello-world:latest"] }'
# 如果需要使用自定义镜像仓库
$ hub-mirror --username=xxxxxx --password=xxxxxx --repository=registry.cn-hangzhou.aliyuncs.com/xxxxxx --content='{ "hub-mirror": ["gcr.io/google-samples/microservices-demo/emailservice:v0.3.5","hello-world:latest"] }'

hub-mirror's People

Contributors

gclm avatar skyedai910 avatar sowevo avatar togettoyou avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.