|
@@ -82,6 +82,31 @@
|
|
<mainClass>com.energy.manage.service.ManageAppApplication</mainClass>
|
|
<mainClass>com.energy.manage.service.ManageAppApplication</mainClass>
|
|
</configuration>
|
|
</configuration>
|
|
</plugin>
|
|
</plugin>
|
|
|
|
+ <!-- Docker maven plugin -->
|
|
|
|
+ <plugin>
|
|
|
|
+ <groupId>com.spotify</groupId>
|
|
|
|
+ <artifactId>docker-maven-plugin</artifactId>
|
|
|
|
+ <version>1.0.0</version>
|
|
|
|
+ <configuration>
|
|
|
|
+ <!-- docker私服的地址 -->
|
|
|
|
+<!-- <dockerHost>http://192.168.112.135:2375</dockerHost>-->
|
|
|
|
+ <!--镜像名称以及版本号-->
|
|
|
|
+ <imageName>${project.build.finalName}:1.0.0</imageName>
|
|
|
|
+ <!-- 若需要重复构建相同标签名称的镜像,可将 forceTags 设置为 true -->
|
|
|
|
+ <forceTags>true</forceTags>
|
|
|
|
+ <!--Dockerfile的位置 -->
|
|
|
|
+ <dockerDirectory>${project.basedir}</dockerDirectory>
|
|
|
|
+ <!-- 这里是复制 jar 包到 docker 容器指定目录配置 -->
|
|
|
|
+ <resources>
|
|
|
|
+ <resource>
|
|
|
|
+ <targetPath>/</targetPath>
|
|
|
|
+ <directory>${project.build.directory}</directory>
|
|
|
|
+ <include>${project.build.finalName}.jar</include>
|
|
|
|
+ </resource>
|
|
|
|
+ </resources>
|
|
|
|
+ </configuration>
|
|
|
|
+ </plugin>
|
|
|
|
+ <!-- Docker maven plugin -->
|
|
<!-- Compiler 插件, 设定JDK版本 -->
|
|
<!-- Compiler 插件, 设定JDK版本 -->
|
|
<plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<groupId>org.apache.maven.plugins</groupId>
|