Skip to content

使用Github Action将DockerHub镜像转存到阿里云私有仓库,供国内服务器使用,免费易用

License

Notifications You must be signed in to change notification settings

nonese/docker_image_pusher

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 Cannot retrieve latest commit at this time.

History

32 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker Images Pusher

使用Github Action将DockerHub镜像转存到阿里云私有仓库,供国内服务器使用,免费易用

视频教程:https://www.bilibili.com/video/BV1Zn4y19743/

作者:技术爬爬虾
B站,抖音,Youtube全网同名,转载请注明作者

使用方式

配置阿里云

登录阿里云容器镜像服务
https://cr.console.aliyun.com/
启用个人实例,创建一个命名空间(ALIYUN_NAME_SPACE

访问凭证–>获取环境变量 用户名(ALIYUN_REGISTRY_USER)
密码(ALIYUN_REGISTRY_PASSWORD)
仓库地址(ALIYUN_REGISTRY

Fork本项目

Fork本项目
进入您自己的项目,点击Action,启用Github Action功能 配置环境变量,进入Settings->Secret and variables->Actions->New Repository secret 将上一步的 ALIYUN_NAME_SPACE,ALIYUN_REGISTRY_USER,ALIYUN_REGISTRY_PASSWORD,ALIYUN_REGISTRY 的值配置成环境变量

添加镜像

打开images.txt文件,添加你想要的镜像,可以带tag,也可以不用(默认latest)
也可添加--platform xxxxx参数指定镜像架构
文件提交后,自动进入Github Action构建

使用镜像

回到阿里云,镜像仓库,点击任意镜像,可查看镜像状态。(可以改成公开,拉取镜像免登录)

在国内服务器pull镜像:

docker pull registry.cn-hangzhou.aliyuncs.com/shrimp-images/alpine

registry.cn-hangzhou.aliyuncs.com 即 ALIYUN_REGISTRY
shrimp-images 即 ALIYUN_NAME_SPACE
alpine 即images.txt里面填的镜像

About

使用Github Action将DockerHub镜像转存到阿里云私有仓库,供国内服务器使用,免费易用

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published