fix: Dockerfile 添加非 root 用户运行应用,提升容器安全性

This commit is contained in:
yukaidi
2026-05-29 02:55:57 +08:00
parent da715c8a8f
commit 377bc12cf9

View File

@@ -14,4 +14,8 @@ RUN unzip netdisk-fast-download-bin.zip && \
EXPOSE 6400 6401 EXPOSE 6400 6401
RUN addgroup --system appgroup && adduser --system --ingroup appgroup appuser && \
chown -R appuser:appgroup /app
USER appuser
ENTRYPOINT ["sh", "run.sh"] ENTRYPOINT ["sh", "run.sh"]