jenkin配置前,配置MAVEN docker插件,修改用线上的luoo_config地址

main
wangqing 11 months ago
parent a0cbe07167
commit 06a12b83b0

@ -29,5 +29,32 @@
<maven.compiler.target>8</maven.compiler.target> <maven.compiler.target>8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties> </properties>
<build>
<finalName>app</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<!-- docker的maven插件官网 https://github.com/spotify/docker-maven-plugin -->
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>0.4.13</version>
<configuration>
<imageName>39.103.180.196:5000/${project.artifactId}:${project.version}</imageName>
<baseImage>jdk1.8</baseImage>
<entryPoint>["java", "-jar","/${project.build.finalName}.jar"]</entryPoint>
<resources>
<resource>
<targetPath>/</targetPath>
<directory>${project.build.directory}</directory>
<include>${project.build.finalName}.jar</include>
</resource>
</resources>
<dockerHost>http://39.103.180.196:2375</dockerHost>
</configuration>
</plugin>
</plugins>
</build>
</project> </project>

@ -53,6 +53,25 @@
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>0.4.13</version>
<configuration>
<imageName>39.103.180.196:5000/${project.artifactId}:${project.version}</imageName>
<baseImage>jdk1.8</baseImage>
<entryPoint>["java", "-jar","/${project.build.finalName}.jar"]</entryPoint>
<resources>
<resource>
<targetPath>/</targetPath>
<directory>${project.build.directory}</directory>
<include>${project.build.finalName}.jar</include>
</resource>
</resources>
<dockerHost>http://39.103.180.196:2375</dockerHost>
</configuration>
</plugin>
</plugins> </plugins>
</build> </build>

@ -4,4 +4,5 @@ spring:
name: eureka name: eureka
profile: dev profile: dev
label: master label: master
uri: http://127.0.0.1:12000 uri: http://116.62.145.60:12000
# uri: http://127.0.0.1:12000

@ -4,4 +4,5 @@ spring:
name: user name: user
profile: dev profile: dev
label: master label: master
uri: http://127.0.0.1:12000 uri: http://116.62.145.60:12000
# uri: http://127.0.0.1:12000
Loading…
Cancel
Save