togettoyou / hub-mirror

🚀 通过 GitHub Actions 将 docker.io、gcr.io、registry.k8s.io、k8s.gcr.io、quay.io、ghcr.io 等国外镜像转换为国内镜像加速下载

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

hub-mirror

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

示例:#2816

试用

直接在我的项目中提交 issues ,按照 issue 模板修改内容即可

个人配置的是阿里云个人实例镜像仓库,仓库限额为 300 ,所以有可能出现上传或拉取失败的情况(本人会不定时清理历史仓库

开始使用

Fork 本项目(可设为私有),绑定你自己的国内镜像仓库

  1. 绑定账号

    Settings-Secrets and variables-Actions 选择 New repository secret 新建 DOCKER_USERNAME(镜像仓库登录名) 和 DOCKER_TOKEN(镜像仓库密码)以及 DOCKER_REPOSITORY 三个 Secrets

    image

    其中 DOCKER_REPOSITORY 配置例子:

    • 腾讯云: ccr.ccs.tencentyun.com/[namespace]
    • 阿里云: registry.cn-hangzhou.aliyuncs.com/[namespace]

    例如我的是:registry.cn-hangzhou.aliyuncs.com/hubmirrorbytogettoyou

    image

  2. 开启 Settings-General-Features 中的 Issues 功能

image

  1. 修改 Settings-Actions-General 中的 Workflow permissionsRead and write permissions

image

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

image

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

image

  1. 在 Fork 的项目中提交 issues

image

About

🚀 通过 GitHub Actions 将 docker.io、gcr.io、registry.k8s.io、k8s.gcr.io、quay.io、ghcr.io 等国外镜像转换为国内镜像加速下载

License:MIT License


Languages

Language:Go 100.0%