Przeglądaj źródła

feat:修改dockerfile文件,安装字体

wuzilong 7 miesięcy temu
rodzic
commit
8813ad7c66
1 zmienionych plików z 9 dodań i 0 usunięć
  1. 9 0
      Dockerfile

+ 9 - 0
Dockerfile

@@ -17,6 +17,15 @@ RUN mvn clean package -DskipTests
 FROM openjdk:17-jdk-slim
 # Set the working directory in the container
 WORKDIR /app
+# Install fonts and fontconfig for Excel export (AWT/POI)
+RUN apt-get update && \
+    apt-get install -y \
+    fontconfig \
+    ttf-dejavu \
+    libfreetype6 \
+    libfontconfig1 \
+    && apt-get clean \
+    && rm -rf /var/lib/apt/lists/*
 # Copy the built JAR file from the previous stage to the container
 COPY --from=build /app/target/*.jar ./app.jar
 # Set the command to run the application