From 8a2552ac94981cfa18cce551066d9ca4ec668558 Mon Sep 17 00:00:00 2001 From: Piotr Jaszczyk Date: Fri, 3 Aug 2018 13:05:15 +0200 Subject: Reorganize docker build * Docker is built in "docker" profile * It is turned on by default * "mvn install" builds and tags docker image * "mvn deploy" pushes the image to the registry * "mvn -DskipDocker ..." skips docker build * Temporarily use OpenJDK 8 instead of 10 - it require us to specify additional JVM options for use inside containers on production hence addition of run-java.sh Change-Id: Ifa67df4ed7de9f3d300d6f6de999a890486dea24 Signed-off-by: Piotr Jaszczyk Issue-ID: DCAEGEN2-653 Signed-off-by: Piotr Jaszczyk --- hv-collector-xnf-simulator/Dockerfile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'hv-collector-xnf-simulator/Dockerfile') 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 ./ - -- cgit 1.2.3-korg