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 amazoncorretto:17-alpine
# 安装 fontconfig 和 DejaVu 字体 (这是一个通用且免费的字体包)
RUN apk --no-cache upgrade && \
# 更新系统包并安装 fontconfig 和 DejaVu 字体 (这是一个通用且免费的字体包)
RUN apk --no-cache update && \
apk --no-cache upgrade && \
apk --no-cache add fontconfig ttf-dejavu
WORKDIR /app
COPY target/data-center-receiver.jar app.jar
EXPOSE 8200

40
pom.xml

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

Loading…
Cancel
Save