File tree Expand file tree Collapse file tree 4 files changed +26
-13
lines changed
Expand file tree Collapse file tree 4 files changed +26
-13
lines changed Original file line number Diff line number Diff line change 44.idea
55.kotlin
66** /build
7- ! yogurt /build /
8- ! yogurt /build /bin /
9- ! yogurt /build /bin /linuxX64 /
10- ! yogurt /build /bin /linuxX64 /releaseExecutable /
11- ! yogurt /build /bin /linuxX64 /releaseExecutable /yogurt.kexe
127** /node_modules
138acidify-core-js
149acidify-docs
Original file line number Diff line number Diff line change @@ -207,7 +207,22 @@ jobs:
207207 uses : actions/download-artifact@v4
208208 with :
209209 name : yogurt-linux-x64
210- path : yogurt/build/bin/linuxX64/releaseExecutable
210+ path : docker/bin/linux-amd64
211+
212+ - name : Download linux-arm64 executable
213+ uses : actions/download-artifact@v4
214+ with :
215+ name : yogurt-linux-arm64
216+ path : docker/bin/linux-arm64
217+
218+ - name : Normalize Docker binaries
219+ run : |
220+ set -euo pipefail
221+ mv docker/bin/linux-amd64/yogurt.kexe docker/bin/linux-amd64/yogurt
222+ mv docker/bin/linux-arm64/yogurt.kexe docker/bin/linux-arm64/yogurt
223+
224+ - name : Set up QEMU
225+ uses : docker/setup-qemu-action@v3
211226
212227 - name : Set up Docker Buildx
213228 uses : docker/setup-buildx-action@v3
@@ -241,7 +256,7 @@ jobs:
241256 with :
242257 context : .
243258 file : docker/Dockerfile
244- platforms : linux/amd64
259+ platforms : linux/amd64,linux/arm64
245260 push : true
246261 tags : ${{ steps.docker_meta.outputs.tags }}
247262 labels : ${{ steps.docker_meta.outputs.labels }}
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ services:
2020 privileged : true
2121 environment :
2222 - ENABLE_HEADLESS=true
23- - RUST_LOG=error # Suppress PMHQ log to make Yogurt log visible
23+ - RUST_LOG=error
2424 volumes :
2525 - qq_volume:/root/.config/QQ
2626 networks :
@@ -36,13 +36,12 @@ services:
3636 yogurt :
3737 image : ghcr.io/llonebot/yogurt-pmhq:latest
3838 container_name : yogurt-pmhq
39- platform : linux/amd64
4039 environment :
4140 - PMHQ_HOST=pmhq
4241 - PMHQ_PORT=13000
4342 - YOGURT_HOST=0.0.0.0
4443 - YOGURT_PORT=3000
45- - YOGURT_ACCESS_TOKEN=change-me
44+ - YOGURT_ACCESS_TOKEN=change-me # 请在此修改 Access Token,确保安全
4645 - HTTP_CORS_ORIGINS=
4746 - WEBHOOK_URLS=
4847 - WEBHOOK_ACCESS_TOKEN=
@@ -87,7 +86,7 @@ Yogurt 支持三种登录方式:当前登录状态继续、快速登录和二
8786 - 如果已经登录,则直接进入初始化;
8887 - 如果尚未登录,则进入二维码登录。
8988
90- PMHQ 的 QQ 配置目录会挂载到独立卷 `qq_volume`。Yogurt 的运行目录会挂载到 `./data`,启动时自动生成 `config.json` 和脚本目录,适合长期保留登录状态与本地数据。镜像内部运行的是 `linuxX64` 的 Kotlin/Native 可执行文件 。
89+ PMHQ 的 QQ 配置目录会挂载到独立卷 `qq_volume`。Yogurt 的运行目录会挂载到 `./data`,启动时自动生成 `config.json` 和脚本目录,适合长期保留登录状态与本地数据。当前发布的 Docker 镜像同时包含 `amd64` 和 `arm64` 两种架构,Docker 会按宿主机自动拉取对应的原生二进制镜像 。
9190
9291Yogurt 容器额外写入了 `host.docker.internal:host-gateway`,因此 webhook 或其他回调服务如果运行在宿主机上,也可以直接从容器内访问。如果你确实需要从宿主机直接访问 PMHQ,再自行给 `pmhq` 服务补端口映射即可。
9392
Original file line number Diff line number Diff line change 11FROM debian:bookworm-slim
22
3+ ARG TARGETARCH
4+
35RUN apt-get update \
46 && apt-get install -y --no-install-recommends ca-certificates jq libcurl4 \
57 && rm -rf /var/lib/apt/lists/*
68
79WORKDIR /app
810
9- COPY yogurt/build/ bin/linuxX64/releaseExecutable/yogurt.kexe /app/yogurt
11+ COPY docker/ bin /tmp/docker-bin
1012COPY docker/startup.sh /app/startup.sh
1113
12- RUN chmod +x /app/startup.sh /app/yogurt
14+ RUN cp "/tmp/docker-bin/linux-${TARGETARCH}/yogurt" /app/yogurt \
15+ && rm -rf /tmp/docker-bin \
16+ && chmod +x /app/startup.sh /app/yogurt
1317
1418ENV YOGURT_DATA_DIR=/app/data
1519
You can’t perform that action at this time.
0 commit comments