From c59d3777fea2e08731bc8b6c0fa7e32e5d3f6ded Mon Sep 17 00:00:00 2001 From: wanghc <2466022993@qq.com> Date: Tue, 07 Mar 2023 18:14:06 +0800 Subject: [PATCH] docker --- cmci-pfcs-gateway/pom.xml | 24 ++++++++++++++++++++++++ 1 files changed, 24 insertions(+), 0 deletions(-) diff --git a/cmci-pfcs-gateway/pom.xml b/cmci-pfcs-gateway/pom.xml index 803ae3a..c9882d9 100644 --- a/cmci-pfcs-gateway/pom.xml +++ b/cmci-pfcs-gateway/pom.xml @@ -81,6 +81,30 @@ <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> + <!-- docker 镜像生成 --> + <plugin> + <groupId>com.spotify</groupId> + <artifactId>docker-maven-plugin</artifactId> + <version>1.2.0</version> + <configuration> + <!-- 镜像名 --> + <imageName>${project.artifactId}</imageName> + <!-- Dockerfile所在目录 --> + <dockerDirectory>${project.basedir}/src/main/docker</dockerDirectory> + <!-- 生成的jar文件 --> + <buildArgs> + <JAR_FILE>${project.build.finalName}.jar</JAR_FILE> + </buildArgs> + <!-- 复制jar到docker容器指定目录 --> + <resources> + <resource> + <targetPath>/</targetPath> + <directory>${project.build.directory}</directory> + <include>${project.build.finalName}.jar</include> + </resource> + </resources> + </configuration> + </plugin> <!-- wsdl生成插件 生成了就不用了 这里注释掉 --> <!-- <plugin>--> <!-- <groupId>org.apache.cxf</groupId>--> -- Gitblit v1.8.0