fix(docker): 用 useradd 替换 adduser(slim 镜像无 adduser)
Debian bookworm-slim 不带 adduser(perl wrapper 包), 导致 build 阶段 exit 127 (command not found)。 改用预装 passwd 包提供的 useradd,语义等价。
This commit is contained in:
+1
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user