summaryrefslogtreecommitdiffstats
path: root/ms/controllerblueprints/application/src/main/docker
diff options
context:
space:
mode:
Diffstat (limited to 'ms/controllerblueprints/application/src/main/docker')
-rw-r--r--ms/controllerblueprints/application/src/main/docker/Dockerfile17
-rw-r--r--ms/controllerblueprints/application/src/main/docker/startService.sh8
2 files changed, 25 insertions, 0 deletions
diff --git a/ms/controllerblueprints/application/src/main/docker/Dockerfile b/ms/controllerblueprints/application/src/main/docker/Dockerfile
new file mode 100644
index 000000000..06304e1db
--- /dev/null
+++ b/ms/controllerblueprints/application/src/main/docker/Dockerfile
@@ -0,0 +1,17 @@
+FROM anapsix/alpine-java:8_jdk
+
+RUN apk add --no-cache curl
+
+COPY startService.sh /startService.sh
+RUN chmod 777 /startService.sh && dos2unix /startService.sh
+
+COPY @project.build.finalName@-@assembly.id@.tar.gz /source.tar.gz
+
+RUN (mkdir -p /source /opt/app/onap) && (tar -xzf /source.tar.gz -C /source) \
+&& (mv /source/@project.build.finalName@ /source/app) \
+&& (cp -rf /source/app/opt/app/onap/lib /opt/app/onap/) \
+&& (cp -rf /source/app/etc /) \
+&& (cp -rf /source/app/load /) \
+&& (rm -rf /source)
+
+ENTRYPOINT /startService.sh
diff --git a/ms/controllerblueprints/application/src/main/docker/startService.sh b/ms/controllerblueprints/application/src/main/docker/startService.sh
new file mode 100644
index 000000000..7077c2246
--- /dev/null
+++ b/ms/controllerblueprints/application/src/main/docker/startService.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+nodeName=ControllerBlueprints_1.0.0_$(cat /proc/self/cgroup | grep docker | sed s/\\//\\n/g | tail -1)
+
+echo "APP Config HOME : ${APP_CONFIG_HOME}"
+export APP_HOME=/opt/app/onap
+
+source /etc/run.source