支持docker

pull/3/head
tanghc 4 years ago
parent b4a805ccef
commit c38c31031a
  1. 3
      sop-gateway/pom.xml
  2. 8
      sop-gateway/src/main/docker/dockerfile

@ -13,7 +13,6 @@
<properties>
<java.version>1.8</java.version>
<docker.image.prefix>gitee.com/sop</docker.image.prefix>
</properties>
<dependencies>
@ -102,7 +101,7 @@
<artifactId>docker-maven-plugin</artifactId>
<version>1.0.0</version>
<configuration>
<imageName>${docker.image.prefix}/${project.artifactId}</imageName>
<imageName>${project.groupId}/${project.artifactId}</imageName>
<!--docker文件所在的目录-->
<dockerDirectory>src/main/docker</dockerDirectory>
<resources>

@ -1,8 +1,10 @@
FROM java:8
VOLUME /tmp
VOLUME /log
ADD sop-gateway-4.0.3-SNAPSHOT.jar sop-gateway-4.0.3.jar
ADD *.jar app.jar
ENV JAVA_OPTS="-Xms128m -Xmx128m --logging.file=log/sop-gateway/log.log --mysql.host=10.1.30.120:3306"
ENV JAVA_OPTS="-Xms128m -Xmx128m"
# springboot配置文件
ENV CONF=" --logging.file=log/spring.log --mysql.host=10.1.30.120:3306 --register.url=10.1.30.110:8848"
ENTRYPOINT java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /sop-gateway-4.0.3.jar
ENTRYPOINT java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /app.jar ${CONF}
Loading…
Cancel
Save