替换docker插件,可直接通过maven插件部署和运行

This commit is contained in:
thinkgem
2020-06-03 23:23:16 +08:00
parent 61a0dd8eed
commit e15fee860e
8 changed files with 50 additions and 51 deletions

View File

@@ -26,9 +26,8 @@
<eclipse-plugin-download-sources>false</eclipse-plugin-download-sources>
<eclipse-plugin-download-javadocs>false</eclipse-plugin-download-javadocs>
<!-- docker service -->
<docker.registryUrl>http://192.168.56.102:2375</docker.registryUrl>
<docker.imageName>${project.groupId}/${project.artifactId}:4.2</docker.imageName>
<!-- docker setting -->
<docker.run.port>8980:8980</docker.run.port>
</properties>
@@ -129,38 +128,6 @@
</plugins>
</build>
<profiles>
<!-- Docker 插件 -->
<profile>
<id>docker</id>
<build>
<plugins>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>1.1.0</version>
<configuration>
<serverId>docker-hub</serverId>
<registryUrl>${docker.registryUrl}</registryUrl>
<dockerHost>${docker.registryUrl}</dockerHost>
<imageName>${docker.imageName}</imageName>
<dockerDirectory>${project.basedir}/bin/docker</dockerDirectory>
<resources>
<resource>
<targetPath>/</targetPath>
<directory>${project.build.directory}</directory>
<include>web.war</include>
</resource>
</resources>
<forceTags>true</forceTags>
<pushImage>false</pushImage>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<developers>
<developer>
<id>thinkgem</id>