fix(docker): 用 useradd 替换 adduser(slim 镜像无 adduser)
Build Docker Image / build (push) Successful in 9m5s
Build Docker Image / deploy (push) Failing after 28s

Debian bookworm-slim 不带 adduser(perl wrapper 包),
导致 build 阶段 exit 127 (command not found)。
改用预装 passwd 包提供的 useradd,语义等价。
This commit is contained in:
2026-05-06 23:28:28 +08:00
parent 28f9a54ba9
commit 2aefdbeef5
+1 -1
View File
@@ -31,7 +31,7 @@ COPY --from=builder /app/publish .
RUN mkdir -p /app/logs
# 非 root 运行,安全加固
RUN adduser --disabled-password --no-create-home obsidian-mcp \
RUN useradd --system --no-create-home --shell /usr/sbin/nologin obsidian-mcp \
&& chown -R obsidian-mcp:obsidian-mcp /app
USER obsidian-mcp