From 4b8cfb3e5bafc0cb078e37f64d0f21e8dfb0916a Mon Sep 17 00:00:00 2001 From: fkrzywka Date: Fri, 1 Jun 2018 12:45:22 +0200 Subject: Docker image creation Maven integration with docker build Closes ONAP-226 Change-Id: I115ff9c13e1bf06a7594a174c7703bfea42f3641 Signed-off-by: fkrzywka Issue-ID: DCAEGEN2-601 --- hv-collector-main/Dockerfile | 11 +++++++++++ hv-collector-main/pom.xml | 39 +++++++++++++++++++++++++++++++++++++-- 2 files changed, 48 insertions(+), 2 deletions(-) create mode 100644 hv-collector-main/Dockerfile (limited to 'hv-collector-main') diff --git a/hv-collector-main/Dockerfile b/hv-collector-main/Dockerfile new file mode 100644 index 00000000..fd7ce21c --- /dev/null +++ b/hv-collector-main/Dockerfile @@ -0,0 +1,11 @@ +FROM openjdk:10-jre-slim +LABEL maintainer="Nokia Wroclaw ONAP Team" + +EXPOSE 8081 + +WORKDIR /opt/ves-hv-collector +ENTRYPOINT ["java", "-cp", "*:", "org.onap.dcae.collectors.veshv.main.MainKt"] +CMD ["--listen-port", "8081", "--config-url", ""] +COPY target/libs/external/* ./ +COPY target/libs/internal/* ./ +COPY target/hv-collector-main-*.jar ./ \ No newline at end of file diff --git a/hv-collector-main/pom.xml b/hv-collector-main/pom.xml index 9f02ed58..80d72331 100644 --- a/hv-collector-main/pom.xml +++ b/hv-collector-main/pom.xml @@ -19,8 +19,8 @@ ~ ============LICENSE_END========================================================= --> + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 @@ -42,6 +42,7 @@ false + ves-hv-collector @@ -54,6 +55,40 @@ maven-surefire-plugin org.apache.maven.plugins + + org.apache.maven.plugins + maven-dependency-plugin + + + copy-internal-deps + package + + copy-dependencies + + + ${project.build.directory}/libs/internal + ${project.parent.groupId} + runtime + + + + copy-external-deps + package + + copy-dependencies + + + ${project.build.directory}/libs/external + ${project.parent.groupId} + runtime + + + + + + io.fabric8 + docker-maven-plugin + -- cgit 1.2.3-korg