Skip to content

Commit 26d25dd

Browse files
committed
arm64 测试构建
1 parent ed643d8 commit 26d25dd

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

.github/workflows/build-yunyu-server-native-image.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ env:
1818

1919
jobs:
2020
build-and-push:
21-
# 回退到标准的 AMD64 Runner,构建速度较快,但产物不支持在 ARM 机器上原生运行
21+
# 使用标准的 ubuntu-latest (AMD64) 并通过 QEMU 模拟构建 linux/arm64
2222
runs-on: ubuntu-latest
2323
permissions:
2424
contents: read
@@ -35,6 +35,10 @@ jobs:
3535
distribution: 'temurin'
3636
cache: 'maven'
3737

38+
# 必须启用 QEMU 才能在 AMD64 机器上构建 ARM64 镜像
39+
- name: Set up QEMU
40+
uses: docker/setup-qemu-action@v3
41+
3842
- name: Set up Docker Buildx
3943
uses: docker/setup-buildx-action@v3
4044

@@ -60,7 +64,7 @@ jobs:
6064
context: .
6165
file: ./docker/native-image/Dockerfile
6266
push: true
63-
platforms: linux/amd64
67+
platforms: linux/arm64
6468
tags: ${{ steps.meta.outputs.tags }}
6569
labels: ${{ steps.meta.outputs.labels }}
6670
cache-from: type=gha

docs/部署/07-Linux Native Image Docker 部署说明.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
```bash
1818
docker compose -f docker/native-image/docker-compose.yml pull
1919
docker compose -f docker/native-image/docker-compose.yml up -d
20+
21+
22+
docker compose up -d
2023
```
2124

2225
## 二、当前镜像说明

0 commit comments

Comments
 (0)