Commit 52fcc671 authored by hongguangwu's avatar hongguangwu

MVP1.7.12-解决社保打包问题——先还原

parent 58fd1e88
...@@ -9,14 +9,12 @@ ARG JAR_FILE=target/yifu-social-biz.jar ...@@ -9,14 +9,12 @@ ARG JAR_FILE=target/yifu-social-biz.jar
COPY ${JAR_FILE} app.jar COPY ${JAR_FILE} app.jar
## 解决使用excel工具转png docker乱码没有宋体 ## 解决使用excel工具转png docker乱码没有宋体
#RUN set -xe && apk --no-cache add fontconfig
#COPY simsun.ttc /usr/share/fonts/
# 使用缓存安装 fontconfig hgw 20250625 # 使用缓存安装 fontconfig hgw 20250625
RUN --mount=type=cache,target=/var/cache/apk set -xe && apk --no-cache add fontconfig #RUN --mount=type=cache,target=/var/cache/apk set -xe && apk --no-cache add fontconfig
# 添加宋体(仅在 simsun.ttc 变更时重新复制) RUN set -xe && apk --no-cache add fontconfig
COPY simsun.ttc /usr/share/fonts/ COPY simsun.ttc /usr/share/fonts/
##end ##end
EXPOSE 5002 EXPOSE 5002
......
...@@ -126,87 +126,30 @@ ...@@ -126,87 +126,30 @@
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId> <artifactId>spring-boot-maven-plugin</artifactId>
</plugin> </plugin>
<plugin> <plugin>
<groupId>io.fabric8</groupId> <groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId> <artifactId>docker-maven-plugin</artifactId>
<version>0.40.2</version> <version>1.1.0</version>
<configuration> <configuration>
<!-- 认证配置 --> <serverId>docker-hub</serverId>
<authConfig> <!--指定生成的镜像名-->
<settings> <imageName>${my.hub.host}/${map.group.name}/${project.artifactId}:${project.version}</imageName>
<serverId>docker-hub</serverId> <dockerDirectory>${project.basedir}/</dockerDirectory>
</settings> <!--指定远程 docker api地址-->
</authConfig> <!--<dockerHost>http://172.16.66.232:2375</dockerHost>-->
<!-- 这里是复制 jar 包到 docker 容器指定目录配置-->
<!-- 镜像配置 --> <resources>
<images> <resource>
<image> <targetPath>/</targetPath>
<!--指定生成的镜像名--> <!--jar 包所在的路径 此处配置的 即对应 target 目录-->
<name>${my.hub.host}/${map.group.name}/${project.artifactId}:${project.version}</name> <directory>${project.build.directory}</directory>
<!-- 需要包含的 jar包 ,这里对应的是 Dockerfile中添加的文件名 -->
<!-- 构建配置 --> <include>${project.build.finalName}.jar</include>
<build> </resource>
<!-- 保持与原目录一致 --> </resources>
<dockerFileDir>${project.basedir}/</dockerFileDir> <forceTags>true</forceTags>
<!-- 等效于原resources配置 -->
<assembly>
<targetDir>/</targetDir>
<descriptorRef>artifact</descriptorRef>
<inline>
<fileSets>
<fileSet>
<!--jar 包所在的路径 此处配置的 即对应 target 目录-->
<directory>${project.build.directory}</directory>
<includes>
<!-- 需要包含的 jar包 ,这里对应的是 Dockerfile中添加的文件名 -->
<include>${project.build.finalName}.jar</include>
</includes>
<outputDirectory>/</outputDirectory>
</fileSet>
</fileSets>
</inline>
</assembly>
<!-- 强制覆盖标签 -->
<tags>
<tag>${project.version}</tag>
</tags>
</build>
<!-- 推送配置 -->
<push>
<enabled>true</enabled>
</push>
</image>
</images>
<!-- 可选:保留原Docker主机配置 -->
<!-- <dockerHost>http://172.16.66.232:2375</dockerHost> -->
</configuration> </configuration>
<!-- 绑定到Maven生命周期 -->
<executions>
<execution>
<id>build-image</id>
<phase>package</phase>
<goals>
<goal>build</goal>
</goals>
</execution>
<execution>
<id>push-image</id>
<phase>deploy</phase>
<goals>
<goal>push</goal>
</goals>
</execution>
</executions>
</plugin> </plugin>
</plugins> </plugins>
<resources> <resources>
<resource> <resource>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment