diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 6b6fd636e2..e68af8e51f 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -27,12 +27,17 @@ jobs: - name: Build and push image Aliyun run: | docker login -u $ALIYUN_REGISTRY_USER -p $ALIYUN_REGISTRY_PASSWORD $ALIYUN_REGISTRY - for line in $(cat images.txt); do + while IFS= read -r line; do + [[ -z "$line" ]] && continue + echo "docker pull $line" docker pull $line - image_name_tag=$(echo $line | awk -F'/' '{print $NF}') + # 获取镜像的完整名称,例如kasmweb/nginx:1.25.3(命名空间/镜像名:版本号) + image=$(echo "$line" | awk '{print $NF}') + # 获取 镜像名:版本号 例如nginx:1.25.3 + image_name_tag=$(echo "$image" | awk -F'/' '{print $NF}') new_image="$ALIYUN_REGISTRY/$ALIYUN_NAME_SPACE/$image_name_tag" echo "docker tag $image $new_image" - docker tag $line $new_image + docker tag $image $new_image echo "docker push $new_image" docker push $new_image - done + done < images.txt \ No newline at end of file diff --git a/README.md b/README.md index 00071074aa..94e0667e17 100644 --- a/README.md +++ b/README.md @@ -33,8 +33,11 @@ Fork本项目
的值配置成环境变量 ### 添加镜像 -打开images.txt文件,添加你想要的镜像,可以带tag,也可以不用(默认latest) -文件提交后自动进入Github Action构建 +打开images.txt文件,添加你想要的镜像,可以带tag,也可以不用(默认latest)
+也可添加--platform xxxxx参数指定镜像架构
+![](doc/images.png) +文件提交后,自动进入Github Action构建 + ### 使用镜像 回到阿里云,镜像仓库,点击任意镜像,可查看镜像状态。(可以改成公开,拉取镜像免登录) diff --git a/doc/images.png b/doc/images.png new file mode 100644 index 0000000000..f97bef76e5 Binary files /dev/null and b/doc/images.png differ diff --git a/images.txt b/images.txt index 920ec97a1e..9d47a4fdb5 100644 --- a/images.txt +++ b/images.txt @@ -1,3 +1,5 @@ alpine -kasmweb/nginx:1.25.3 python:alpine3.19 +kasmweb/nginx:1.25.3 +--platform linux/arm64 cooderl/wewe-rss-sqlite:latest +