refactor(build): 切换到 musl 交叉编译 + distroless 镜像方案

- docker-publish.yml: 改为 cross 交叉编译 amd64/arm64 musl 静态二进制,
  前端在 CI 独立构建, buildx 组装多架构镜像
- Dockerfile.app: 从 139 行容器内编译简化为 24 行纯 COPY 打包
- Dockerfile.app.local: 移除 jemalloc 动态链接 (LD_PRELOAD/libjemalloc2)
- aether-gateway: 引入 tikv-jemallocator 静态链接 jemalloc
This commit is contained in:
fawney19
2026-04-11 12:21:33 +08:00
parent e37a32c83d
commit f68c67021c
6 changed files with 146 additions and 224 deletions

View File

@@ -58,6 +58,9 @@ url.workspace = true
uuid.workspace = true
webpki-roots.workspace = true
[target.'cfg(not(target_env = "msvc"))'.dependencies]
tikv-jemallocator = "0.6"
[dev-dependencies]
aether-testkit.workspace = true
tracing-subscriber.workspace = true

View File

@@ -1,3 +1,7 @@
#[cfg(not(target_env = "msvc"))]
#[global_allocator]
static GLOBAL: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;
use clap::{Args as ClapArgs, Parser, ValueEnum};
use tracing::{debug, info, warn};