From ead5573e8e43e7e4ae795ff6029635fa5bf2a284 Mon Sep 17 00:00:00 2001 From: Grzegorz Wielgosinski Date: Wed, 24 Mar 2021 13:24:05 +0100 Subject: Configure maven to build docker image Issue-ID: INT-1896 Signed-off-by: Grzegorz Wielgosinski Change-Id: Id0d201b26bc946af6cd0af34714fb912e2aef77f --- docker/Dockerfile | 16 ++++++++++++++++ pom.xml | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 docker/Dockerfile diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 0000000..08bb20f --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,16 @@ +FROM nexus3.onap.org:10001/onap/integration-java11:8.0.0 + +COPY --chown=onap:onap a1-pe-simulator*.jar /a1-pe-simulator/a1-pe-simulator.jar + +# Create conf directory where vnf.config and topology files will be placed by ONAP controller +USER root +RUN mkdir /var/netconf2 && chown onap:onap /var/netconf2 +USER onap + +COPY --chown=onap:onap resource/* /var/netconf2/ + +WORKDIR /a1-pe-simulator + +EXPOSE 9998 + +ENTRYPOINT exec java $JAVA_SEC_OPTS $JAVA_OPTS -Djava.security.egd=file:/dev/urandom -Duser.home=/a1-pe-simulator -Dproc.name=a1-pe-simulator -jar a1-pe-simulator.jar diff --git a/pom.xml b/pom.xml index fabb4fd..1e9db85 100644 --- a/pom.xml +++ b/pom.xml @@ -90,6 +90,13 @@ 11 + UTF-8 + yyyyMMdd'T'HHmmss + true + nexus3.onap.org:10003 + 0.31.0 + onap + org.onap.a1pesimulator @@ -163,7 +170,39 @@ + + io.fabric8 + docker-maven-plugin + ${docker-maven-plugin.version} + + + docker-build-image + package + + build + push + + + + + ${skipDockerPush} + true + IfNotPresent + + + ${docker-image.namespace}/${docker-image.name.prefix}.${project.artifactId} + ${docker.registry} + + + ${project.version}-${maven.build.timestamp}Z + + + + + + + -- cgit 1.2.3-korg