aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Dockerfile5
-rw-r--r--pom.xml8
2 files changed, 9 insertions, 4 deletions
diff --git a/Dockerfile b/Dockerfile
index 5f43f6b..a3c56b2 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,4 +1,7 @@
FROM openjdk:8-jdk-alpine
-ADD target/nbi-rest-services-1.0.0-SNAPSHOT.jar app.jar
+
+ARG PKG_FILENAME=nbi-rest-services-1.0.0-SNAPSHOT.jar
+
+ADD target/$PKG_FILENAME app.jar
ENV JAVA_OPTS="-Djava.security.egd=file:/dev/./urandom -Dspring.profiles.active=docker -jar"
ENTRYPOINT exec java $JAVA_OPTS /app.jar \ No newline at end of file
diff --git a/pom.xml b/pom.xml
index c96aaf9..4043ac7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -313,7 +313,7 @@
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
- <version>0.19.1</version>
+ <version>0.25.0</version>
<configuration>
<verbose>true</verbose>
<apiVersion>1.23</apiVersion>
@@ -330,6 +330,9 @@
<tag>${docker.latest.tag}</tag>
</tags>
<dockerFileDir>${project.basedir}</dockerFileDir>
+ <args>
+ <PKG_FILENAME>${project.build.finalName}.${project.packaging}</PKG_FILENAME>
+ </args>
</build>
</image>
</images>
@@ -342,8 +345,7 @@
<goal>remove</goal>
</goals>
<configuration>
- <removeAll>true</removeAll>
- <image>nbi</image>
+ <removeMode>all</removeMode>
</configuration>
</execution>
<execution>