summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--packages/policy-pap-docker/src/main/docker/Dockerfile18
-rw-r--r--packages/policy-pap-docker/src/main/docker/policy-pap.sh7
2 files changed, 12 insertions, 13 deletions
diff --git a/packages/policy-pap-docker/src/main/docker/Dockerfile b/packages/policy-pap-docker/src/main/docker/Dockerfile
index f84a2b8d..4b0892c2 100644
--- a/packages/policy-pap-docker/src/main/docker/Dockerfile
+++ b/packages/policy-pap-docker/src/main/docker/Dockerfile
@@ -4,22 +4,22 @@ LABEL maintainer="Policy Team"
ARG POLICY_LOGS=/var/log/onap/policy/pap
-ENV POLICY_LOGS ${POLICY_LOGS}
-ENV POLICY_PAP_HOME=${POLICY_HOME}/pap
+ENV POLICY_LOGS=$POLICY_LOGS
+ENV POLICY_HOME=$POLICY_HOME/pap
-RUN mkdir -p ${POLICY_PAP_HOME} ${POLICY_LOGS} ${POLICY_PAP_HOME}/bin && \
- chown -R policy:policy ${POLICY_PAP_HOME} ${POLICY_LOGS}
+RUN mkdir -p $POLICY_HOME $POLICY_LOGS $POLICY_HOME/bin && \
+ chown -R policy:policy $POLICY_HOME $POLICY_LOGS
RUN mkdir /packages
COPY /maven/* /packages
-RUN tar xvfz /packages/policy-pap.tar.gz --directory ${POLICY_PAP_HOME} \
+RUN tar xvfz /packages/policy-pap.tar.gz --directory $POLICY_HOME \
&& rm /packages/policy-pap.tar.gz
-WORKDIR ${POLICY_PAP_HOME}
+WORKDIR $POLICY_HOME
COPY policy-pap.sh bin/.
-RUN chown -R policy:policy * && chmod 755 bin/*.sh \
- && cp ${POLICY_PAP_HOME}/etc/ssl/* ${POLICY_HOME}/etc/ssl && chown policy:policy ${POLICY_HOME}/etc/ssl/*
+
+RUN chown -R policy:policy * && chmod 755 bin/*.sh
USER policy
-WORKDIR ${POLICY_PAP_HOME}/bin
+WORKDIR $POLICY_HOME/bin
ENTRYPOINT [ "bash", "./policy-pap.sh" ]
diff --git a/packages/policy-pap-docker/src/main/docker/policy-pap.sh b/packages/policy-pap-docker/src/main/docker/policy-pap.sh
index f72a5b50..c313d6dd 100644
--- a/packages/policy-pap-docker/src/main/docker/policy-pap.sh
+++ b/packages/policy-pap-docker/src/main/docker/policy-pap.sh
@@ -21,7 +21,6 @@
#
JAVA_HOME=/usr/lib/jvm/java-1.8-openjdk/
-POLICY_PAP_HOME=/opt/app/policy/pap
KEYSTORE="${POLICY_HOME}/etc/ssl/policy-keystore"
KEYSTORE_PASSWD="Pol1cy_0nap"
TRUSTSTORE="${POLICY_HOME}/etc/ssl/policy-truststore"
@@ -42,15 +41,15 @@ fi
if [ -z "$CONFIG_FILE" ]
then
- CONFIG_FILE="$POLICY_PAP_HOME/etc/defaultConfig.json"
+ CONFIG_FILE="${POLICY_HOME}/etc/defaultConfig.json"
fi
if [ -z "$PROP_FILE" ]
then
- PROP_FILE="$POLICY_PAP_HOME/etc/topic.properties"
+ PROP_FILE="${POLICY_HOME}/etc/topic.properties"
fi
echo "Policy pap config file: $CONFIG_FILE"
echo "Policy pap property file: $PROP_FILE"
-$JAVA_HOME/bin/java -cp "$POLICY_PAP_HOME/etc:$POLICY_PAP_HOME/lib/*" -Djavax.net.ssl.keyStore="$KEYSTORE" -Djavax.net.ssl.keyStorePassword="$KEYSTORE_PASSWD" -Djavax.net.ssl.trustStore="$TRUSTSTORE" -Djavax.net.ssl.trustStorePassword="$TRUSTSTORE_PASSWD" org.onap.policy.pap.main.startstop.Main -c $CONFIG_FILE -p $PROP_FILE
+$JAVA_HOME/bin/java -cp "${POLICY_HOME}/etc:${POLICY_HOME}/lib/*" -Djavax.net.ssl.keyStore="$KEYSTORE" -Djavax.net.ssl.keyStorePassword="$KEYSTORE_PASSWD" -Djavax.net.ssl.trustStore="$TRUSTSTORE" -Djavax.net.ssl.trustStorePassword="$TRUSTSTORE_PASSWD" org.onap.policy.pap.main.startstop.Main -c $CONFIG_FILE -p $PROP_FILE