Giter Club home page Giter Club logo

docker-pull-proxy's Introduction

docker-pull-proxy

有一些海外镜像(gcr.io docker.io)很难拉取,可以通过此仓库自动把指定 docker 镜像上传到我们的私有仓库

使用方式

一定要看看 一定要看看 一定要看看

当需要将某个镜像如 nginx:alpine 上传到私有仓库 registry.cn-beijing.aliyuncs.com/ijx-public/nginx:alpine

docker hub 镜像是支持多 cpu 架构的,默认 github action 拉取是宿主机相同 cpu 架构,应该都是x86 . 如果需要拉取别的 cpu 架构支持,可以按照修改修改 pull.sh 文件

第一步

修改 trigger.txt 内容, 内容分为两部分,中间使用空格隔开, 目前每次代码提交都会触发镜像同步,需要注意

  • 前面是需要同步的镜像
  • 后面是上传到阿里云地址的镜像
    • 第一部分是阿里云容器镜像仓库地址
    • 第二部分是我们自己的命名空间地址
    • 最后就是镜像名称和版本
nginx:alpine registry.cn-beijing.aliyuncs.com/ijx-public/nginx:alpine

并提交

第二步

提交 github 后,会触发 actions,等待 actions build 成功

第三步

若 build 成功,可以在本地拉取私有仓库的镜像

如果阿里云在控制台没有登录,就需要登录下,在阿里云个人凭证那里有登录命令, 如果用户名被脱敏了,那注意修改下。
使用 docker 命令获取阿里云同步完的镜像,地址格式和 trigger.txt 后半部分内容一致的

# 下载镜像
docker pull registry.cn-beijing.aliyuncs.com/ijx-public/nginx:alpine

# 如果需要把镜像名称改回去,可以这样
docker tag  registry.cn-beijing.aliyuncs.com/ijx-public/nginx:alpine nginx:alpine

自建 docker 镜像加速

使用 cf worker 创建

worker 怎么用可以参考这里

docker registry worker 脚本在这里

有海外服务器的,使用 nginx

教程链接地址

docker-pull-proxy's People

Contributors

ji-yuhang avatar yaming116 avatar

Stargazers

XiaoYu avatar  avatar  avatar harri2012 avatar  avatar Angelia avatar xieshiyu9527 avatar 李苏珩 avatar 嘻嘻 avatar  avatar  avatar  avatar  avatar  avatar Daqing Liu avatar  avatar  avatar  avatar  avatar  avatar  avatar vincent avatar Haoming Tang avatar Jury Schon avatar  avatar fanxb avatar INS6+ avatar  avatar  avatar apiwork avatar MmeSweet avatar LeeyonYu avatar  avatar  avatar ChpiTer avatar lyc7456 avatar KamiYeung avatar  avatar  avatar jinbulee avatar 梓宏 avatar  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.