Commit 6f6bb489 by fengshuonan

新增docker插件

parent b8a0fd83
......@@ -35,5 +35,4 @@ hs_err_pid*
.DS_Store
docker/
dockerCerts/
_dockerCerts/
......@@ -167,6 +167,7 @@
</dependencies>
<build>
<finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
......@@ -201,6 +202,30 @@
<useDefaultDelimiters>false</useDefaultDelimiters>
</configuration>
</plugin>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>0.26.1</version>
<configuration>
<dockerHost>tcp://demo.stylefeng.cn:2376</dockerHost>
<certPath>_dockerCerts</certPath>
<images>
<image>
<alias>service</alias>
<name>stylefeng/${project.artifactId}:latest</name>
<build>
<from>java:8</from>
<assembly>
<descriptor>docker-assembly.xml</descriptor>
</assembly>
<cmd>
<shell>java -jar /maven/${project.artifactId}.jar</shell>
</cmd>
</build>
</image>
</images>
</configuration>
</plugin>
</plugins>
<resources>
<resource>
......
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
<files>
<file>
<source>target/${project.artifactId}.jar</source>
<destName>${project.artifactId}.jar</destName>
</file>
</files>
</assembly>
\ No newline at end of file
......@@ -61,7 +61,7 @@ guns:
spring:
profiles: dev
datasource:
url: jdbc:mysql://127.0.0.1:3306/guns?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=CTT
url: jdbc:mysql://172.17.119.19:3306/guns?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=CTT
username: root
password: root
filters: wall,mergeStat
......
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