ADD: Dockerfile
ADD: config pom.xml of Dockerfile
This commit is contained in:
parent
ad009e153f
commit
471c2e312d
4
Dockerfile
Normal file
4
Dockerfile
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
FROM hub.c.163.com/library/java:latest
|
||||||
|
VOLUME /tmp
|
||||||
|
ADD target/blog-1.0.1-SNAPSHOT.jar blog.jar
|
||||||
|
ENTRYPOINT ["java","-jar","/blog.jar"]
|
||||||
32
pom.xml
32
pom.xml
@ -3,7 +3,7 @@
|
|||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<groupId>com.yrp</groupId>
|
<groupId>cn.allms</groupId>
|
||||||
<artifactId>blog</artifactId>
|
<artifactId>blog</artifactId>
|
||||||
<version>0.0.1-SNAPSHOT</version>
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
@ -88,6 +88,36 @@
|
|||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>com.spotify</groupId>
|
||||||
|
<artifactId>docker-maven-plugin</artifactId>
|
||||||
|
<version>1.2.0</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>build-image</id>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>build</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
<configuration>
|
||||||
|
<dockerHost>http://103.153.100.47:2375</dockerHost>
|
||||||
|
<imageName>mx/${project.artifactId}</imageName>
|
||||||
|
<imageTags>
|
||||||
|
<imageTag>${project.version}</imageTag>
|
||||||
|
</imageTags>
|
||||||
|
<forceTags>true</forceTags>
|
||||||
|
<dockerDirectory>${project.basedir}</dockerDirectory>
|
||||||
|
<resources>
|
||||||
|
<resource>
|
||||||
|
<targetPath>/</targetPath>
|
||||||
|
<directory>${project.build.directory}</directory>
|
||||||
|
<include>${project.build.finalName}.jar</include>
|
||||||
|
</resource>
|
||||||
|
</resources>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user