tech-shrimp 13bac139d4 1
2024-06-08 23:21:11 +08:00

46 lines
1.5 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将Docker镜像上传到阿里云供国内服务器使用免费易配置
作者:**技术爬爬虾**<br>
B站抖音Youtube全网同名转载请注明作者<br>
## 使用方式
### 配置阿里云
登录阿里云容器镜像服务<br>
https://cr.console.aliyun.com/<br>
启用个人实例创建一个命名空间ALIYUN_NAME_SPACE
![](/doc/命名空间.png)
进入访问凭证<br>
获取用户名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>
registry.cn-hangzhou.aliyuncs.com 即变量 ALIYUN_REGISTRY<br>
shrimp-images 即变量 ALIYUN_NAME_SPACE<br>
alpine 即images.txt里面填的镜像名称<br>
```
docker pull registry.cn-hangzhou.aliyuncs.com/shrimp-images/alpine
```