Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
44743d7
Update images.txt
Tiane-ira Aug 19, 2025
930745b
Update images.txt
Tiane-ira Sep 2, 2025
abb7537
Update images.txt
Tiane-ira Sep 9, 2025
ad3913e
Update images.txt
Tiane-ira Sep 24, 2025
5ad69cd
test arm
Tiane-ira Sep 29, 2025
e6e024e
test arm
Tiane-ira Sep 29, 2025
a445efe
feat: 添加本地拉取阿里云镜像的脚本
Tiane-ira Sep 29, 2025
d99e1e4
feat(sync): 支持多平台镜像同步
Tiane-ira Sep 30, 2025
4e0649e
fix(sync): 更新脚本参数检查逻辑
Tiane-ira Sep 30, 2025
75bc35b
fix(sync): 更新脚本参数检查逻辑
Tiane-ira Sep 30, 2025
af245c0
feat: 添加多架构镜像同步逻辑
Tiane-ira Aug 19, 2025
cca28ac
refactor: add docker tags: nginx
Tiane-ira Sep 30, 2025
c769a11
test
Tiane-ira Sep 30, 2025
2b92c6b
refactor: add docker tags: nginx
Tiane-ira Sep 30, 2025
00092ca
fix: 调整 arm 镜像逻辑
Tiane-ira Sep 30, 2025
bf97515
refactor: add docker tags: elasticsearch
Tiane-ira Sep 30, 2025
11f8fda
refactor: add docker tags: elasticsearch:9.1.4
Tiane-ira Sep 30, 2025
0e37bee
feat: 支持 arm 镜像
Tiane-ira Sep 30, 2025
1b1aee9
refactor: add docker tags: nginx:1.29.1
Tiane-ira Sep 30, 2025
c39ef73
feat: 支持 arm 镜像
Tiane-ira Sep 30, 2025
439efbc
refactor: add docker tags: mysql:8.4.5
Tiane-ira Nov 7, 2025
d208ebf
refactor: add docker tags: mysql:8.4.5
Tiane-ira Nov 7, 2025
b7c690f
refactor: add docker tags: mysql:8.4.5
Tiane-ira Nov 7, 2025
92ed6eb
refactor: add docker tags: bitnamilegacy/redis:8.0 bitnamilegacy/elas…
Tiane-ira Nov 7, 2025
883b4f6
refactor: add docker tags: golang:1.24-alpine node:22-alpine nginx:1.…
Tiane-ira Nov 7, 2025
aef0ff4
refactor: add docker tags: cozedev/coze-studio-server cozedev/coze-st…
Tiane-ira Nov 7, 2025
173c224
refactor: add docker tags: kindest/node:v1.26.3
Tiane-ira Nov 10, 2025
a4fdae9
refactor: add docker tags: nacos/nacos-server:latest
Tiane-ira Nov 11, 2025
86e212f
fix: amd64
Tiane-ira Nov 18, 2025
db65fc5
refactor: add docker tags: mysql:8.0.32
Tiane-ira Nov 18, 2025
9e41801
refactor: add docker tags: redis:6.2.11
Tiane-ira Nov 24, 2025
4ded8f3
refactor: add docker tags: redis
Dec 9, 2025
c969de1
refactor: add docker tags: mysql
Dec 9, 2025
ede2745
feat: 拉取镜像时同时拉取arm和amd镜像
Dec 9, 2025
a6064a7
feat: 拉取镜像时同时拉取arm和amd镜像
Dec 9, 2025
f7f663b
refactor: add docker tags: nacos/nacos-server:v3.1.1
Dec 10, 2025
2aa71eb
refactor: add docker tags: yuxiaoyao520/jrebel-license-active-server:…
Dec 10, 2025
a77ab58
refactor: add docker tags: apache/apisix:3.14.1-debian bitnamilegacy/…
Dec 11, 2025
04e8846
refactor: add docker tags: oceanbase/oceanbase-ce
Dec 13, 2025
59e4071
refactor: add docker tags: cloudflare/cloudflared:latest
Dec 21, 2025
8c59bfb
refactor: add docker tags: nginx:1.27.3
Jan 18, 2026
57d31c6
refactor: add docker tags: rust:1.80
Tiane-ira Jan 29, 2026
db9c20f
refactor: add docker tags: justlikemaki/openclaw-docker-cn-im:latest
Tiane-ira Feb 28, 2026
695a259
update: 增大拉取延迟
Tiane-ira Feb 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .github/workflows/sync.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ run-name: ${{ github.actor }} is running GitHub Actions
on: [push]
jobs:
Sync-Docker-Image-Actions:
strategy:
matrix:
platform:
- linux/amd64
- linux/arm64
runs-on: ubuntu-latest
steps:
- name: Check out repository code
Expand All @@ -12,5 +17,10 @@ jobs:
docker login -u "${{ secrets.DOCKER_USER }}" -p "${{ secrets.DOCKER_PWD }}" "${{ secrets.DOCKER_REGISTRY }}"
- name: execute sync.sh
run: |
bash "${{ github.workspace }}/sync.sh" "${{ github.workspace }}/images.txt" "${{ secrets.DOCKER_REGISTRY }}" "${{ secrets.DOCKER_NS }}"
if [[ "${{ matrix.platform }}" == "linux/arm64" ]]; then
NS="${{ secrets.DOCKER_NS_ARM }}"
else
NS="${{ secrets.DOCKER_NS }}"
fi
bash "${{ github.workspace }}/sync.sh" "${{ github.workspace }}/images.txt" "${{ secrets.DOCKER_REGISTRY }}" "$NS" "${{ matrix.platform }}"
- run: echo "This job's status is ${{ job.status }}"
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
cmd/conf.yaml
cmd/conf.yaml
.idea
.vscode
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@

![image](images/077GE2yiN_IRLeapyG-PvWwf2xKNMgeiVPtFWVIW-GA.png)

这里创建两个命名空间,一个用于x86架构,一个用于arm架构,方便后续脚本配置

记住该命名空间名称,后续配置会用到。

4. **记录登录凭证**
Expand Down Expand Up @@ -98,7 +100,8 @@ fork开源仓库[https://github.com/you8023/docker\_images\_sync](https://github
* `DOCKER_USER`:阿里云账户
* `DOCKER_PWD`:2.1中第2步设置的阿里云镜像仓库密码
* `DOCKER_REGISTRY`:2.1中第4步中记住的登录凭证页面中的仓库地址
* `DOCKER_NS`:2.1中第3步创建的命名空间名称
* `DOCKER_NS`:2.1中第3步创建的x86架构的命名空间名称
* `DOCKER_NS_ARM`:2.1中第3步创建的arm64架构的命名空间名称

添加后应能看到:

Expand All @@ -112,9 +115,9 @@ fork开源仓库[https://github.com/you8023/docker\_images\_sync](https://github
1. 复制本地仓库中的`cmd/conf.yaml.default`文件并命名为`cmd/conf.yaml`
2. 编辑`cmd/conf.yaml` ,配置说明如下:

```bash
```yaml
registry: 阿里云个人镜像仓库地址,形如:crpi-xxx.cn-xxx.personal.cr.aliyuncs.com
namespace: 阿里云个人镜像仓库命名空间名称
namespace: 阿里云个人镜像仓库命名空间名称(根据自己的cpu架构选择对应的命名空间)
images_dir: git仓库路径,例如:"E:\Git\docker_images_sync"
max_retries: 拉取镜像重试次数,默认为60
retry_delay: 拉取镜像尝试间隔(秒),默认为1
Expand Down
4 changes: 2 additions & 2 deletions cmd/docker_pull
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ while IFS= read -r line || [ -n "$line" ]; do
done < "$CONFIG_FILE"

# Set defaults
MAX_RETRIES=${MAX_RETRIES:-60}
RETRY_DELAY=${RETRY_DELAY:-1}
MAX_RETRIES=${MAX_RETRIES:-120}
RETRY_DELAY=${RETRY_DELAY:-5}
FIRST_DELAY=${FIRST_DELAY:-20}

# Check required configurations
Expand Down
1 change: 1 addition & 0 deletions cmd/images.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mysql:8.4.5
2 changes: 1 addition & 1 deletion images.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@

justlikemaki/openclaw-docker-cn-im:latest
9 changes: 5 additions & 4 deletions sync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,17 @@ set -eux


# 检查参数数量是否正确
if [ "$#" -ne 3 ]; then
echo "错误:脚本需要3个参数 images_file、docker_registry和docker_namespace"
echo "用法: $0 <images_file> <docker_registry> <docker_namespace>"
if [ "$#" -ne 4 ]; then
echo "错误:脚本需要4个参数 images_file、docker_registry、docker_namespace、platform"
echo "用法: $0 <images_file> <docker_registry> <docker_namespace> <platform>"
exit 1
fi


IMAGES_FILE=$1
TARGET_REGISTRY=$2
TARGET_NAMESPACE=$3
TARGET_PLATFORM=$4

# 检查文件是否存在
if [ ! -f "$IMAGES_FILE" ]; then
Expand All @@ -25,7 +26,7 @@ failed_images=""
while IFS= read -r image; do
# 拉取镜像
set +e
docker pull "$image"
docker pull --platform="$TARGET_PLATFORM" "$image"
pull_status=$?
if [ $pull_status -ne 0 ]; then
echo "Error: Failed to pull image $image, continuing..."
Expand Down