fix: Docker EXPOSE 改为仅 6401,entrypoint 添加 -Duser.timezone

审查发现:
- EXPOSE 6400 误导用户映射后端端口,实际只需 6401(反向代理)
- TZ 环境变量不如 JVM -Duser.timezone 可靠
This commit is contained in:
yukaidi
2026-05-29 09:57:05 +08:00
parent 732a7f86fe
commit 1d243b8f1b
2 changed files with 2 additions and 2 deletions

View File

@@ -16,7 +16,7 @@ RUN unzip netdisk-fast-download-bin.zip && \
COPY ./docker-entrypoint.sh /docker-entrypoint.sh COPY ./docker-entrypoint.sh /docker-entrypoint.sh
RUN chmod +x /docker-entrypoint.sh RUN chmod +x /docker-entrypoint.sh
EXPOSE 6400 6401 EXPOSE 6401
RUN addgroup --system appgroup && adduser --system --ingroup appgroup appuser RUN addgroup --system appgroup && adduser --system --ingroup appgroup appuser
ENTRYPOINT ["/docker-entrypoint.sh"] ENTRYPOINT ["/docker-entrypoint.sh"]

View File

@@ -6,4 +6,4 @@ chown -R appuser:appgroup /app/db /app/logs /app/resources 2>/dev/null || true
# Run Java directly - entrypoint is PID 1, exec makes Java PID 1 # Run Java directly - entrypoint is PID 1, exec makes Java PID 1
# Docker SIGTERM goes directly to Java, triggering ShutdownHook # Docker SIGTERM goes directly to Java, triggering ShutdownHook
exec java -Xmx${JVM_XMX:-512M} ${JVM_OPTS} -jar /app/netdisk-fast-download.jar exec java -Xmx${JVM_XMX:-512M} ${JVM_OPTS} -Duser.timezone=${TZ:-Asia/Shanghai} -jar /app/netdisk-fast-download.jar