初始化博客后端

This commit is contained in:
2026-05-14 16:35:50 +08:00
commit 84e70aff12
646 changed files with 44291 additions and 0 deletions

15
Dockerfile Normal file
View File

@@ -0,0 +1,15 @@
# 使用你自建的精简 JRE 基础镜像(非 root, JVM 优化, 时区等已配置)
FROM moshangjunmowen/jdk-jre:v17.0.19
ARG JAR_FILE
LABEL maintainer="moshangjunmowen@foxmail.com"
# 复制 JAR 并设置所有权给非 root 用户 appuser (uid=1001)
COPY --chown=appuser:appuser ${JAR_FILE} /app/app.jar
# 通过追加 JAVA_TOOL_OPTIONS 来安全注入额外 JVM 参数
# 注意:基础镜像已设定 -Xmx1024M -Xms256M这里合并不会覆盖
ENV JAVA_TOOL_OPTIONS="-Djava.security.egd=file:/dev/./urandom ${JAVA_TOOL_OPTIONS}"
# 保持基础镜像的 ENTRYPOINT ["java", "-jar"],只需指定 jar 路径
CMD ["/app/app.jar"]