File tree Expand file tree Collapse file tree 1 file changed +2
-12
lines changed
Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Original file line number Diff line number Diff line change @@ -28,17 +28,7 @@ RUN mvn clean package -DskipTests
2828# 运行阶段
2929FROM openjdk:17-jdk-slim
3030
31- # 安装必要的工具和字体库
32- RUN apt-get update && apt-get install -y \
33- locales \
34- fontconfig \
35- libfreetype6 \
36- fonts-noto-cjk \
37- && locale-gen zh_CN.UTF-8 \
38- && update-locale LANG=zh_CN.UTF-8 \
39- && rm -rf /var/lib/apt/lists/*
40-
41- # 设置中文环境变量
31+ # 设置中文环境变量(基础支持,不依赖 locale-gen)
4232ENV LANG=zh_CN.UTF-8 \
4333 LANGUAGE=zh_CN:zh \
4434 LC_ALL=zh_CN.UTF-8
@@ -52,7 +42,7 @@ COPY --from=builder /official/target/Official-*.jar official.jar
5242# 暴露端口
5343EXPOSE 8080
5444
55- # 添加JVM参数以支持UTF-8编码和字体处理
45+ # 添加JVM参数以支持UTF-8编码和无头模式
5646ENV JAVA_TOOL_OPTIONS="-Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8 -Djava.awt.headless=true"
5747
5848# 启动应用
You can’t perform that action at this time.
0 commit comments