Skip to content

Commit 5d17185

Browse files
committed
配置更稳定的maven源
1 parent 9f04d92 commit 5d17185

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

Dockerfile

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,7 @@ RUN mvn clean package -DskipTests
2828
# 运行阶段
2929
FROM 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)
4232
ENV 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
# 暴露端口
5343
EXPOSE 8080
5444

55-
# 添加JVM参数以支持UTF-8编码和字体处理
45+
# 添加JVM参数以支持UTF-8编码和无头模式
5646
ENV JAVA_TOOL_OPTIONS="-Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8 -Djava.awt.headless=true"
5747

5848
# 启动应用

0 commit comments

Comments
 (0)