chore(docker): 调整 Dockerfile 以排查权限问题

- 移除 COPY 命令中的 --chown 选项,确保文件复制过程简化。
- 添加 chmod 命令以确保二进制文件具有执行权限。
- 暂时使用 root 用户运行,以便排查权限相关问题。
This commit is contained in:
zhouyonggao 2025-12-20 15:23:00 +08:00
parent 25a26b82a2
commit 164927ac4f
1 changed files with 5 additions and 2 deletions

View File

@ -68,7 +68,10 @@ RUN apk add --no-cache ca-certificates tzdata && \
# 清理缓存
rm -rf /var/cache/apk/*
WORKDIR /app
COPY --from=builder --chown=appuser:appuser /out/server /app/server
COPY --from=builder /out/server /app/server
# 确保二进制文件有执行权限
RUN chmod +x /app/server && ls -la /app/server
EXPOSE 8077
USER appuser:appuser
# 暂时使用 root 用户运行,排查权限问题
# USER appuser:appuser
ENTRYPOINT ["/app/server"]