aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPrudence Au <prudence.au@amdocs.com>2018-08-17 18:34:55 +0000
committerGerrit Code Review <gerrit@onap.org>2018-08-17 18:34:55 +0000
commit74fa909cf98e5a158e789f34b892747cc823427d (patch)
treeba33fbfe8d0b7d57d83d47a3c45547952e6b1583 /src
parent92a058213a7ff50520e7ba5d388df46d30cb2ebd (diff)
parentd072a72499ec16f08af206758633dd362747fe08 (diff)
Merge "Docker file: Network Discovery Context Builder"
Diffstat (limited to 'src')
-rw-r--r--src/main/docker/Dockerfile19
-rw-r--r--src/main/docker/startService.sh8
2 files changed, 27 insertions, 0 deletions
diff --git a/src/main/docker/Dockerfile b/src/main/docker/Dockerfile
new file mode 100644
index 0000000..9963da1
--- /dev/null
+++ b/src/main/docker/Dockerfile
@@ -0,0 +1,19 @@
+FROM anapsix/alpine-java:jre8
+
+ARG MICROSERVICE_HOME=/opt/app/
+
+# Build up the deployment folder structure
+RUN mkdir -p $MICROSERVICE_HOME
+RUN mkdir -p $MICROSERVICE_HOME/config/
+RUN mkdir -p $MICROSERVICE_HOME/lib/
+RUN mkdir -p $MICROSERVICE_HOME/bin/
+
+ADD pomba-network-discovery-context-builder.jar $MICROSERVICE_HOME/lib/
+ADD startService.sh $MICROSERVICE_HOME/bin/
+COPY config/ $MICROSERVICE_HOME/config/
+
+RUN chmod 755 $MICROSERVICE_HOME/config/*
+RUN chmod 755 $MICROSERVICE_HOME/lib/*
+RUN chmod 755 $MICROSERVICE_HOME/bin/*
+
+CMD ["/opt/app/bin/startService.sh"] \ No newline at end of file
diff --git a/src/main/docker/startService.sh b/src/main/docker/startService.sh
new file mode 100644
index 0000000..7cc6952
--- /dev/null
+++ b/src/main/docker/startService.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+cd /opt/app
+if [ -z "${java_runtime_arguments}" ]; then
+ java -Dlogging.config=config/logback.xml -Xms128m -Xmx512m -jar /opt/app/lib/pomba-network-discovery-context-builder.jar
+else
+ java -Dlogging.config=config/logback.xml $java_runtime_arguments -jar /opt/app/lib/pomba-network-discovery-context-builder.jar
+fi \ No newline at end of file