支持docker

pull/3/head
tanghc 4 years ago
parent 3ea29e8bf0
commit 5e081b5cfd
  1. 19
      sop-gateway/pom.xml
  2. 4
      sop-gateway/src/main/docker/dockerfile

@ -13,6 +13,7 @@
<properties>
<java.version>1.8</java.version>
<docker.image.prefix>gitee.com/sop</docker.image.prefix>
</properties>
<dependencies>
@ -95,6 +96,24 @@
<skipTests>true</skipTests>
</configuration>
</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>
</build>

@ -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"]
Loading…
Cancel
Save