Skip to content

同步外网(如:gcr.io)容器镜像至 Docker Hub

License

Notifications You must be signed in to change notification settings

wujie1993/mirrors

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mirrors

利用 Github Actions 将外网仓库(如:registry.k8s.io)镜像同步到 dockerhub,再将镜像拉取至本地

快速拉取镜像到本地

curl https://raw.githubusercontent.com/wujie1993/mirrors/main/docker-pull -o docker-pull
chmod +x docker-pull
./docker-pull <镜像>

可拉取的镜像清单见 docker-images.list 文件

同步 Docker 镜像到 dockerhub

  1. 下载脚本
git clone git@github.com:wujie1993/mirrors.git
  1. 编辑 docker-images.list 文件,填入需要同步的镜像列表,每条镜像记录一行
vim docker-images.list

可通过 # 符号注释不需要同步的镜像记录,节约镜像同步时间

  1. 提交 docker-images.list 文件更新内容至本仓库
git add docker-images.list
git commit -s -m"update docker image list"
git push origin
  1. 等待 Github Action 运行完毕

拉取单个镜像到本地

bash ./docker-pull <image>

批量拉取镜像到本地

# 编辑 docker-images.list 移除所要拉取镜像的注释符号
bash ./docker-pull

About

同步外网(如:gcr.io)容器镜像至 Docker Hub

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages