diff --git a/.gitea/workflows/Multi-main.yaml b/.gitea/workflows/Multi-main.yaml index 82f0993..013b3b6 100644 --- a/.gitea/workflows/Multi-main.yaml +++ b/.gitea/workflows/Multi-main.yaml @@ -1,4 +1,4 @@ -name: build-docker-images-for-latest-release-github-ver +name: build-docker-images-for-multi-latest-release on: push: @@ -76,13 +76,14 @@ jobs: echo "DOCKER_CLIENT_TIMEOUT=300" >> $GITHUB_ENV echo "DOCKER_BUILD_TIMEOUT=300" >> $GITHUB_ENV - # Build and push the Docker image for all platforms + # Build and push the Docker image for all platforms (including multi-architecture support) - name: Build and Push Multi-Platform Docker Image uses: http://fly6516.synology.me:4000/docker/build-push-action@v4 with: push: true tags: fly6516.synology.me:8080/multilang:latest context: . + file: ./Dockerfile # Ensure this points to the correct Dockerfile location platforms: linux/amd64,linux/arm64,linux/arm/v7 # Optional: Verify the pushed image diff --git a/Dockerfile b/Dockerfile index e9318bd..617e740 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,6 +9,11 @@ FROM fly6516.synology.me:8080/ubuntu:20.04 # 设置环境变量 ENV DEBIAN_FRONTEND=noninteractive +# 安装 QEMU 模拟器,支持多架构构建 +RUN apt-get update && apt-get install -y \ + qemu-user-static \ + && rm -rf /var/lib/apt/lists/* + # 使用南京大学的 apt 源 # RUN sed -i 's/archive.ubuntu.com/mirrors.nju.edu.cn/g' /etc/apt/sources.list