fix: build the Backend image as glibc so it can load libssl [CI]
ci/woodpecker/push/main-amd64-build Pipeline failed

The musl AotAnywhere output is a fully static executable, which cannot dlopen libssl: the Backend exited with 'No usable version of libssl was found' on start. Use linux-x64/arm64 and the Debian runtime-deps base.
This commit is contained in:
justme committed 2026-10-07 02:21:31 +08:00
1 parent d3fadc0bf8
commit 18a6898a27
3 files changed
+6 -5

No files matched your search

+4 -3
View File
@@ -1,5 +1,6 @@
#!/usr/bin/env bash
# Build a musl NativeAOT Backend OCI image with statically linked SQLite; publishing is optional.
# Build a glibc NativeAOT Backend OCI image with statically linked SQLite; publishing is optional.
# glibc and a dynamic executable are required: the musl AotAnywhere output is fully static and cannot dlopen libssl, so the signing code fails at startup.
set -euo pipefail
arch="${1:?usage: release-linux.sh <amd64|arm64>}"
@@ -28,8 +29,8 @@ if [[ "$image_publish" == true ]]; then
}
fi
case "$arch" in
amd64) rid=linux-musl-x64 ;;
arm64) rid=linux-musl-arm64 ;;
amd64) rid=linux-x64 ;;
arm64) rid=linux-arm64 ;;
*) echo "unsupported architecture: $arch" >&2; exit 2 ;;
esac
+1 -1
View File
@@ -24,7 +24,7 @@ macOS 的 Apple Silicon 产物带临时 ad-hoc 签名,Intel 产物未签名。
## Backend 容器
Backend 使用 OCI 标准镜像,通过 `registry.oeo.one/moshiro/moshiro-backend:<version>` 分发,支持 `linux/amd64` 和 `linux/arm64`。容器使用 musl NativeAOT 单文件程序,基底为 `mcr.microsoft.com/dotnet/runtime-deps:10.0-alpine`,以非 root 用户运行,在 `8080/tcp` 提供 HTTP 服务;数据库和原始数据统一写入 `/data`。程序启用 InvariantGlobalization,无需 .NET 运行时或 ICU;时间查询使用 UTC。SQLite 从固定版本的官方源码编译并静态链接,不再随镜像携带 `libe_sqlite3.so`。将 `/data` 挂载为持久卷,并在反向代理处配置 HTTPS。
Backend 使用 OCI 标准镜像,通过 `registry.oeo.one/moshiro/moshiro-backend:<version>` 分发,支持 `linux/amd64` 和 `linux/arm64`。容器使用 glibc NativeAOT 单文件程序(动态链接,运行时要加载 libssl;musl 的静态产物做不到),基底为 `mcr.microsoft.com/dotnet/runtime-deps:10.0`(Debian),以非 root 用户运行,在 `8080/tcp` 提供 HTTP 服务;数据库和原始数据统一写入 `/data`。程序启用 InvariantGlobalization,无需 .NET 运行时或 ICU;时间查询使用 UTC。SQLite 从固定版本的官方源码编译并静态链接,不再随镜像携带 `libe_sqlite3.so`。将 `/data` 挂载为持久卷,并在反向代理处配置 HTTPS。
在部署目录保存此仓库的 `compose.yaml`,先通过部署平台的环境变量或密钥管理设置 `MOSHIRO_ADMIN_PASSWORD`(可选设置 `MOSHIRO_ADMIN_USER`、`MOSHIRO_VERSION`),然后启动:
+1 -1
View File
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/runtime-deps:10.0-alpine
FROM mcr.microsoft.com/dotnet/runtime-deps:10.0
ARG APP_VERSION=unknown
LABEL org.opencontainers.image.title="MoShiro Backend" \