diff options
Diffstat (limited to 'mod/runtimeapi')
-rw-r--r-- | mod/runtimeapi/runtime-web/Dockerfile | 10 | ||||
-rw-r--r-- | mod/runtimeapi/runtime-web/pom.xml | 31 |
2 files changed, 28 insertions, 13 deletions
diff --git a/mod/runtimeapi/runtime-web/Dockerfile b/mod/runtimeapi/runtime-web/Dockerfile deleted file mode 100644 index 5d17d41..0000000 --- a/mod/runtimeapi/runtime-web/Dockerfile +++ /dev/null @@ -1,10 +0,0 @@ -FROM openjdk:8-jre-alpine -WORKDIR /usr/app -VOLUME /tmp -ADD target/runtime-web-1.0.0.jar runtime-web-1.0.0.jar - -EXPOSE 9090 - -ENTRYPOINT ["java", \ - "-Djava.security.egd=file:/dev/./urandom", \ - "-jar", "runtime-web-1.0.0.jar"] diff --git a/mod/runtimeapi/runtime-web/pom.xml b/mod/runtimeapi/runtime-web/pom.xml index 27cc960..3b39845 100644 --- a/mod/runtimeapi/runtime-web/pom.xml +++ b/mod/runtimeapi/runtime-web/pom.xml @@ -66,25 +66,50 @@ <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> + <executions> + <execution> + <goals> + <goal>repackage</goal> + </goals> + </execution> + </executions> </plugin> <plugin> <groupId>io.fabric8</groupId> <artifactId>docker-maven-plugin</artifactId> <configuration> <verbose>true</verbose> - <imagePullPolicy>IfNotPresent</imagePullPolicy> + <pullRegistry>${docker.pull.registry}</pullRegistry> + <pushRegistry>${docker.push.registry}</pushRegistry> <images> <image> <name>onap/${project.groupId}.${project.artifactId}</name> <registry>${onap.nexus.dockerregistry.daily}</registry> <build> - <contextDir>${project.basedir}</contextDir> - <cleanup>none</cleanup> + <from>openjdk:8-jre-alpine</from> <tags> <tag>latest</tag> <tag>${project.version}</tag> <tag>${project.version}-${maven.build.timestamp}Z</tag> </tags> + <assembly> + <descriptorRef>artifact</descriptorRef> + </assembly> + <workdir>/maven</workdir> + <volumes> + <volume>/tmp</volume> + </volumes> + <ports> + <port>9090</port> + </ports> + <entryPoint> + <exec> + <arg>java</arg> + <arg>-Djava.security.egd=file:/dev/./urandom</arg> + <arg>-jar</arg> + <arg>${project.artifactId}-${project.version}.${project.packaging}</arg> + </exec> + </entryPoint> </build> </image> </images> |