aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--hv-collector-dcae-app-simulator/Dockerfile8
-rw-r--r--hv-collector-main/Dockerfile8
-rw-r--r--hv-collector-xnf-simulator/Dockerfile9
-rw-r--r--pom.xml26
4 files changed, 35 insertions, 16 deletions
diff --git a/hv-collector-dcae-app-simulator/Dockerfile b/hv-collector-dcae-app-simulator/Dockerfile
index 55bf645c..955cc8e6 100644
--- a/hv-collector-dcae-app-simulator/Dockerfile
+++ b/hv-collector-dcae-app-simulator/Dockerfile
@@ -1,4 +1,4 @@
-FROM openjdk:10-jre-slim
+FROM docker.io/openjdk:8-jre-slim
LABEL copyright="Copyright (C) 2018 NOKIA"
LABEL license.name="The Apache Software License, Version 2.0"
@@ -10,7 +10,11 @@ RUN apt-get update \
&& apt-get clean
WORKDIR /opt/ves-hv-dcae-app-simulator
-ENTRYPOINT ["java", "-cp", "*:", "org.onap.dcae.collectors.veshv.simulators.dcaeapp.MainKt"]
+ENTRYPOINT ["./run-java.sh", "run"]
+COPY target/docker-extra/run-java/run-java.sh ./
+
+ENV JAVA_MAIN_CLASS=org.onap.dcae.collectors.veshv.simulators.dcaeapp.MainKt
+
COPY target/libs/external/* ./
COPY target/libs/internal/* ./
COPY target/hv-collector-dcae-app-simulator-*.jar ./
diff --git a/hv-collector-main/Dockerfile b/hv-collector-main/Dockerfile
index 1e5f55f8..8216ac46 100644
--- a/hv-collector-main/Dockerfile
+++ b/hv-collector-main/Dockerfile
@@ -1,4 +1,4 @@
-FROM openjdk:10-jre-slim
+FROM docker.io/openjdk:8-jre-slim
LABEL copyright="Copyright (C) 2018 NOKIA"
LABEL license.name="The Apache Software License, Version 2.0"
@@ -11,7 +11,11 @@ RUN apt-get update \
&& apt-get clean
WORKDIR /opt/ves-hv-collector
-ENTRYPOINT ["java", "-cp", "*:", "org.onap.dcae.collectors.veshv.main.MainKt"]
+ENTRYPOINT ["./run-java.sh", "run"]
+COPY target/docker-extra/run-java/run-java.sh ./
+
+ENV JAVA_MAIN_CLASS=org.onap.dcae.collectors.veshv.main.MainKt
+
COPY target/libs/external/* ./
COPY target/libs/internal/* ./
COPY target/hv-collector-main-*.jar ./
diff --git a/hv-collector-xnf-simulator/Dockerfile b/hv-collector-xnf-simulator/Dockerfile
index e48a80e7..53406459 100644
--- a/hv-collector-xnf-simulator/Dockerfile
+++ b/hv-collector-xnf-simulator/Dockerfile
@@ -1,4 +1,4 @@
-FROM openjdk:10-jre-slim
+FROM docker.io/openjdk:8-jre-slim
LABEL copyright="Copyright (C) 2018 NOKIA"
LABEL license.name="The Apache Software License, Version 2.0"
@@ -10,8 +10,11 @@ RUN apt-get update \
&& apt-get clean
WORKDIR /opt/ves-hv-client-simulator
-ENTRYPOINT ["java", "-cp", "*:", "org.onap.dcae.collectors.veshv.simulators.xnf.MainKt"]
+ENTRYPOINT ["./run-java.sh", "run"]
+COPY target/docker-extra/run-java/run-java.sh ./
+
+ENV JAVA_MAIN_CLASS=org.onap.dcae.collectors.veshv.simulators.xnf.MainKt
+
COPY target/libs/external/* ./
COPY target/libs/internal/* ./
COPY target/hv-collector-xnf-simulator-*.jar ./
-
diff --git a/pom.xml b/pom.xml
index 6bbcef3b..7504d4f2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -82,11 +82,11 @@
<!-- Docker -->
<skipDocker>false</skipDocker>
+ <maven.build.timestamp.format>yyyyMMdd'T'HHmmss</maven.build.timestamp.format>
<docker-image.registry>${onap.nexus.dockerregistry.daily}</docker-image.registry>
<docker-image.namespace>onap</docker-image.namespace>
<docker-image.name>${project.groupId}.${project.artifactId}</docker-image.name>
<docker.http_proxy></docker.http_proxy>
- <docker.https_proxy></docker.https_proxy>
</properties>
@@ -406,7 +406,7 @@
<executions>
<execution>
<id>docker-build-image</id>
- <phase>deploy</phase>
+ <phase>package</phase>
<goals>
<goal>build</goal>
</goals>
@@ -425,25 +425,33 @@
<images>
<image>
<alias>${project.artifactId}</alias>
- <name>${docker-image.registry}/${docker-image.namespace}/${docker-image.name}
+ <name>${docker-image.namespace}/${docker-image.name}
</name>
- <tags>
- <tag>${project.version}-SNAPSHOT-${maven.build.timestamp}Z</tag>
- <tag>${project.version}</tag>
- <tag>latest</tag>
- </tags>
+ <registry>${docker-image.registry}</registry>
<build>
<!--
<args>
<http_proxy>${docker.http_proxy}</http_proxy>
- <https_proxy>${docker.https_proxy}</https_proxy>
+ <https_proxy>${docker.http_proxy}</https_proxy>
</args>
-->
<dockerFileDir>${project.basedir}</dockerFileDir>
+ <tags>
+ <tag>${project.version}-SNAPSHOT-${maven.build.timestamp}Z</tag>
+ <tag>${project.version}</tag>
+ <tag>latest</tag>
+ </tags>
</build>
</image>
</images>
</configuration>
+ <dependencies>
+ <dependency>
+ <groupId>io.fabric8</groupId>
+ <artifactId>run-java-sh</artifactId>
+ <version>1.2.2</version>
+ </dependency>
+ </dependencies>
</plugin>
</plugins>
</pluginManagement>