summaryrefslogtreecommitdiffstats
path: root/packages/docker/src/main
diff options
context:
space:
mode:
authorJorge Hernandez <jh1730@att.com>2018-04-05 12:19:21 -0500
committerJorge Hernandez <jh1730@att.com>2018-04-05 12:19:21 -0500
commita73501afc572e3f2142253855cc66f8ad084e593 (patch)
treeb176116d00ff3bf85087a359c21157d839fa7fdc /packages/docker/src/main
parent155e6205083493851894623b855cd0ec99bbe7c2 (diff)
Optionally load available applicationsv1.2.0
During container instantiation, it will check for available applications to preload, ie. control loop or any other ones. It will install them if available or start with no applications loaded otherwise. Change-Id: I6908d279cbe34e04bcabf830ed30480ba147598f Issue-ID: POLICY-735 Signed-off-by: Jorge Hernandez <jh1730@att.com>
Diffstat (limited to 'packages/docker/src/main')
-rw-r--r--packages/docker/src/main/docker/Dockerfile5
-rw-r--r--packages/docker/src/main/docker/do-start.sh8
2 files changed, 10 insertions, 3 deletions
diff --git a/packages/docker/src/main/docker/Dockerfile b/packages/docker/src/main/docker/Dockerfile
index 6d5c4ab7..b06edf1b 100644
--- a/packages/docker/src/main/docker/Dockerfile
+++ b/packages/docker/src/main/docker/Dockerfile
@@ -42,13 +42,12 @@ RUN mkdir -p ${POLICY_HOME}/config ${POLICY_LOGS} ${POLICY_INSTALL}/config && \
WORKDIR ${POLICY_INSTALL}
-COPY install-drools.zip apps-controlloop.zip docker-install.sh do-start.sh wait-for-port.sh ./
+COPY install-drools.zip docker-install.sh do-start.sh wait-for-port.sh ./
VOLUME [ "${POLICY_INSTALL}/config", "${POLICY_HOME}/config" ]
RUN unzip -o install-drools.zip && \
- unzip -o apps-controlloop.zip && \
- rm install-drools.zip apps-controlloop.zip && \
+ rm install-drools.zip && \
chown -R policy:policy * && \
chmod +x *.sh
diff --git a/packages/docker/src/main/docker/do-start.sh b/packages/docker/src/main/docker/do-start.sh
index 5f156979..56c07bc1 100644
--- a/packages/docker/src/main/docker/do-start.sh
+++ b/packages/docker/src/main/docker/do-start.sh
@@ -23,6 +23,14 @@ else
find -L ${POLICY_HOME}/config -type l -exec rm -- {} +
fi
+ apps=$(ls config/apps*.zip 2> /dev/null)
+
+ echo "Applications found: ${apps}"
+
+ if [[ -n ${apps} ]]; then
+ unzip -o ${apps}
+ fi
+
echo "docker install at ${PWD}"
./docker-install.sh