mirror of
https://gitee.com/durcframework/SOP.git
synced 2025-08-11 21:57:56 +08:00
支持docker
This commit is contained in:
@@ -13,6 +13,7 @@
|
|||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<java.version>1.8</java.version>
|
<java.version>1.8</java.version>
|
||||||
|
<docker.image.prefix>gitee.com/sop</docker.image.prefix>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
@@ -95,6 +96,24 @@
|
|||||||
<skipTests>true</skipTests>
|
<skipTests>true</skipTests>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<!-- docker插件 -->
|
||||||
|
<plugin>
|
||||||
|
<groupId>com.spotify</groupId>
|
||||||
|
<artifactId>docker-maven-plugin</artifactId>
|
||||||
|
<version>1.0.0</version>
|
||||||
|
<configuration>
|
||||||
|
<imageName>${docker.image.prefix}/${project.artifactId}</imageName>
|
||||||
|
<!--docker文件所在的目录-->
|
||||||
|
<dockerDirectory>src/main/docker</dockerDirectory>
|
||||||
|
<resources>
|
||||||
|
<resource>
|
||||||
|
<targetPath>/</targetPath>
|
||||||
|
<directory>${project.build.directory}</directory>
|
||||||
|
<include>${project.build.finalName}.jar</include>
|
||||||
|
</resource>
|
||||||
|
</resources>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
|
4
sop-gateway/src/main/docker/dockerfile
Normal file
4
sop-gateway/src/main/docker/dockerfile
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
FROM java:8
|
||||||
|
VOLUME /tmp
|
||||||
|
ADD sop-gateway-4.0.3-SNAPSHOT.jar sop-gateway-4.0.3.jar
|
||||||
|
ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/sop-gateway-4.0.3.jar"]
|
Reference in New Issue
Block a user