Browse Source

fix(Dockerfile): 更新系统包并添加字体依赖

确保在安装字体前更新系统包,避免潜在的依赖问题
zhc
zhczyx 1 month ago
parent
commit
e1c6481f17
  1. 6
      Dockerfile
  2. 40
      pom.xml

6
Dockerfile

@ -1,9 +1,11 @@
# FROM registry.ap-northeast-1.aliyuncs.com/southwave/jdk17-template:latest # FROM registry.ap-northeast-1.aliyuncs.com/southwave/jdk17-template:latest
FROM amazoncorretto:17-alpine FROM amazoncorretto:17-alpine
# 安装 fontconfig 和 DejaVu 字体 (这是一个通用且免费的字体包) # 更新系统包并安装 fontconfig 和 DejaVu 字体 (这是一个通用且免费的字体包)
RUN apk --no-cache upgrade && \ RUN apk --no-cache update && \
apk --no-cache upgrade && \
apk --no-cache add fontconfig ttf-dejavu apk --no-cache add fontconfig ttf-dejavu
WORKDIR /app WORKDIR /app
COPY target/data-center-receiver.jar app.jar COPY target/data-center-receiver.jar app.jar
EXPOSE 8200 EXPOSE 8200

40
pom.xml

@ -613,26 +613,26 @@
</plugin> </plugin>
<!--&lt;!&ndash;正式环境&ndash;&gt;--> <!--&lt;!&ndash;正式环境&ndash;&gt;-->
<!-- <plugin>--> <!-- <plugin>
<!-- <groupId>io.fabric8</groupId>--> <groupId>io.fabric8</groupId>
<!-- <artifactId>docker-maven-plugin</artifactId>--> <artifactId>docker-maven-plugin</artifactId>
<!-- <version>0.38.1</version>--> <version>0.38.1</version>
<!-- <configuration>--> <configuration>
<!-- <authConfig>--> <authConfig>
<!-- <username>AKIAR26KHSVRUEAKRBPZ</username>--> <username>AKIAR26KHSVRUEAKRBPZ</username>
<!-- <password>wmMPx9vypaNi5ZIlyz4c018hKCb2M1dnGBdA+oh2</password>--> <password>wmMPx9vypaNi5ZIlyz4c018hKCb2M1dnGBdA+oh2</password>
<!-- </authConfig>--> </authConfig>
<!-- <images>--> <images>
<!-- <image>--> <image>
<!-- <name>${aws.ecr.registry}/aeon-prod/${aws.ecr.repository}:latest</name>--> <name>${aws.ecr.registry}/aeon-prod/${aws.ecr.repository}:latest</name>
<!-- <registry>${aws.ecr.registry}</registry>--> <registry>${aws.ecr.registry}</registry>
<!-- <build>--> <build>
<!-- <dockerFile>${project.basedir}/Dockerfile</dockerFile>--> <dockerFile>${project.basedir}/Dockerfile</dockerFile>
<!-- </build>--> </build>
<!-- </image>--> </image>
<!-- </images>--> </images>
<!-- </configuration>--> </configuration>
<!-- </plugin>--> </plugin> -->
<!-- 测试环境--> <!-- 测试环境-->
<plugin> <plugin>

Loading…
Cancel
Save