aboutsummaryrefslogtreecommitdiffstats
path: root/packages/docker/src
diff options
context:
space:
mode:
authorJorge Hernandez <jorge.hernandez-herrero@att.com>2019-03-10 22:17:39 -0500
committerJorge Hernandez <jorge.hernandez-herrero@att.com>2019-03-10 22:17:39 -0500
commitc308b05193f4b427c6b5fe7c52649967ec796f2d (patch)
tree425a16cffe13b57ba908c96d9bf84fc8de922398 /packages/docker/src
parent72d313cdeb92ef291442b8189d52ac23a7cc8b71 (diff)
fixing problems related to move to Alpine base OS
Three problems are solved: (a) no amsterdam application comes up, (b) wait for mariadb not working, (c) timeout does not work (different syntax). Change-Id: Ib46312201e8be06816b1339e543711f293225ca1 Issue-ID: POLICY-1551 Signed-off-by: Jorge Hernandez <jorge.hernandez-herrero@att.com>
Diffstat (limited to 'packages/docker/src')
-rw-r--r--packages/docker/src/main/docker/Dockerfile8
-rw-r--r--packages/docker/src/main/docker/wait-for-port.sh2
2 files changed, 6 insertions, 4 deletions
diff --git a/packages/docker/src/main/docker/Dockerfile b/packages/docker/src/main/docker/Dockerfile
index 464ae4aa..587e7845 100644
--- a/packages/docker/src/main/docker/Dockerfile
+++ b/packages/docker/src/main/docker/Dockerfile
@@ -9,6 +9,7 @@ ENV BUILD_VERSION ${BUILD_VERSION}
ENV JAVA_HOME /usr/lib/jvm/java-1.8-openjdk
ENV POLICY_INSTALL ${POLICY_INSTALL}
+ENV POLICY_INSTALL_INIT ${POLICY_INSTALL}/config
ENV POLICY_HOME ${POLICY_HOME}
ENV POLICY_LOGS ${POLICY_LOGS}
ENV POLICY_CONFIG ${POLICY_HOME}/config
@@ -16,7 +17,8 @@ ENV POLICY_LOGBACK ${POLICY_CONFIG}/logback.xml
ENV POLICY_DOCKER true
RUN apk --update add --no-cache busybox-extras \
- bash zip unzip curl \
+ bash coreutils grep findutils \
+ zip unzip curl \
wget openssh maven jq \
httpie py-pip openjdk8
@@ -26,14 +28,14 @@ RUN addgroup -S policy && adduser -S policy -s /bin/bash
RUN apk --update add --no-cache mariadb-client
RUN pip install http-prompt
-RUN mkdir -p ${POLICY_HOME}/config ${POLICY_LOGS} ${POLICY_INSTALL}/config && \
+RUN mkdir -p ${POLICY_HOME}/config ${POLICY_LOGS} ${POLICY_INSTALL_INIT} && \
chown -R policy:policy ${POLICY_HOME} ${POLICY_LOGS} ${POLICY_INSTALL}
WORKDIR ${POLICY_INSTALL}
COPY install-drools.zip docker-install.sh do-start.sh wait-for-port.sh ./
-VOLUME [ "${POLICY_INSTALL}/config" ]
+VOLUME [ "${POLICY_INSTALL_INIT}" ]
RUN unzip -o install-drools.zip && \
rm install-drools.zip && \
diff --git a/packages/docker/src/main/docker/wait-for-port.sh b/packages/docker/src/main/docker/wait-for-port.sh
index 65c6a5c1..577afa34 100644
--- a/packages/docker/src/main/docker/wait-for-port.sh
+++ b/packages/docker/src/main/docker/wait-for-port.sh
@@ -28,7 +28,7 @@ host=$1
port=$2
echo "Waiting for $host port $port open"
-until telnet $host $port </dev/null 2>/dev/null | grep -q '^Connected'; do
+until nc -vz $host $port 2> /dev/null; do
sleep 1
done