dockerporter/README.md
2024-10-11 21:33:21 +08:00

59 lines
1.1 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.

# dockerporter
一个可以将`images.yaml`清单中的多个来源的镜像标签构建为多平台镜像并推送到一个指定仓库的工具。
## 环境依赖
- docker
- docker buildx
- go (1.23+)
## 用法
### 用go编码运行
```sh
go run main.go
```
### 无go环境使用
```sh
./main
```
## linux安装go环境
### 下载安装
```sh
wget https://go.dev/dl/go1.23.2.linux-amd64.tar.gz
rm -rf /usr/local/go && tar -C /usr/local -xzf go1.23.2.linux-amd64.tar.gz
```
### 环境变量
编辑`/etc/profile`文件,在最后一行添加:
```sh
export PATH=$PATH:/usr/local/go/bin
```
执行`source`命令使环境变量配置立即生效:
```sh
source /etc/profile
```
## 问题
如果`images.yaml`清单中的镜像tag过多的话有可能会遇到429报错
```text
429 Too Many Requests - Server message: toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit
```
## 已知缺陷
- 如果构建失败的话,在日志文件中只会看到`exit code 1`,但不会看到控制台输出的内容。