TechShrimp技术爬爬虾 0469513a50
Update README.md
2024-06-09 11:14:17 +08:00

50 lines
1.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Docker Images Pusher
使用Github Action将DockerHub镜像转存到阿里云私有仓库供国内服务器使用免费易用
视频教程https://www.bilibili.com/video/BV1Zn4y19743/
作者:**技术爬爬虾**<br>
B站抖音Youtube全网同名转载请注明作者<br>
## 使用方式
### 配置阿里云
登录阿里云容器镜像服务<br>
https://cr.console.aliyun.com/<br>
启用个人实例,创建一个命名空间(**ALIYUN_NAME_SPACE**
![](/doc/命名空间.png)
获取用户名(**ALIYUN_REGISTRY_USER**)<br>
密码(**ALIYUN_REGISTRY_PASSWORD**)<br>
仓库地址(**ALIYUN_REGISTRY**<br>
![](/doc/用户名密码.png)
### Fork本项目
Fork本项目<br>
进入您自己的项目点击Action启用Github Action功能
配置环境变量进入Settings->Secret and variables->Actions->New Repository secret
![](doc/配置环境变量.png)
将上一步的 ALIYUN_NAME_SPACEALIYUN_REGISTRY_USERALIYUN_REGISTRY_PASSWORDALIYUN_REGISTRY
的值配置成环境变量
### 添加镜像
打开images.txt文件添加你想要的镜像可以带tag也可以不用默认latest
文件提交后自动进入Github Action构建
### 使用镜像
回到阿里云,镜像仓库,可以将镜像修改为公有。点击任意镜像,可查看镜像状态。
![](doc/开始使用.png)
在国内服务器pull镜像<br>
```
docker pull registry.cn-hangzhou.aliyuncs.com/shrimp-images/alpine
```
registry.cn-hangzhou.aliyuncs.com 即 ALIYUN_REGISTRY<br>
shrimp-images 即 ALIYUN_NAME_SPACE<br>
alpine 即images.txt里面填的镜像<br>