浏览代码

done

release/0.0.1
wyz 4 年前
父节点
当前提交
d55d52adba
共有 3 个文件被更改,包括 21 次插入12 次删除
  1. +4
    -0
      Dockerfile
  2. +16
    -11
      pom.xml
  3. +1
    -1
      src/main/docker/Dockerfile

+ 4
- 0
Dockerfile 查看文件

@ -0,0 +1,4 @@
FROM openjdk:8-jdk-alpine
VOLUME /tmp/docker-selfmade
ADD target/DeliveryTakingSystem-0.0.2-SNAPSHOT.jar app.jar
CMD java -jar app.jar

+ 16
- 11
pom.xml 查看文件

@ -73,18 +73,23 @@
<!-- Docker maven plugin -->
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>1.0.0</version>
<artifactId>dockerfile-maven-plugin</artifactId>
<version>1.4.6</version>
<executions>
<execution>
<id>default</id>
<goals>
<goal>build</goal>
<goal>push</goal>
</goals>
</execution>
</executions>
<configuration>
<imageName>${docker.image.prefix}/${project.artifactId}</imageName>
<dockerDirectory>src/main/docker</dockerDirectory>
<resources>
<resource>
<targetPath>/</targetPath>
<directory>${project.build.directory}</directory>
<include>${project.build.finalName}.jar</include>
</resource>
</resources>
<repository>betaberry/common</repository>
<tag>0.0.1</tag>
<buildArgs>
<JAR_FILE>app.jar</JAR_FILE>
</buildArgs>
</configuration>
</plugin>
<!-- Docker maven plugin -->

+ 1
- 1
src/main/docker/Dockerfile 查看文件

@ -1,4 +1,4 @@
FROM openjdk:8-jdk-alpine
VOLUME /tmp
VOLUME /tmp/docker-selfmade
ADD DeliveryTakingSystem-0.0.2-SNAPSHOT.jar app.jar
ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/app.jar"]

正在加载...
取消
保存