diff options
author | Jorge Hernandez <jorge.hernandez-herrero@att.com> | 2019-03-15 00:23:28 -0500 |
---|---|---|
committer | Jorge Hernandez <jorge.hernandez-herrero@att.com> | 2019-03-15 00:32:09 -0500 |
commit | 74783258249fd8793a7ea865880060c7ef330b3e (patch) | |
tree | 8ebb2d27f81178460566d5d90d85ca703d79c097 /controlloop/packages/docker-controlloop/src/main/docker/Dockerfile | |
parent | 9be9d1e3486d03c13b438dc814376e6832410f8e (diff) |
Baking "runtime" software into image
Change-Id: I329596e6c23283cc4c31d689c621d7b4d1a298d7
Issue-ID: POLICY-1560
Signed-off-by: Jorge Hernandez <jorge.hernandez-herrero@att.com>
Diffstat (limited to 'controlloop/packages/docker-controlloop/src/main/docker/Dockerfile')
-rw-r--r-- | controlloop/packages/docker-controlloop/src/main/docker/Dockerfile | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/controlloop/packages/docker-controlloop/src/main/docker/Dockerfile b/controlloop/packages/docker-controlloop/src/main/docker/Dockerfile index 28631c7e6..1044e27ed 100644 --- a/controlloop/packages/docker-controlloop/src/main/docker/Dockerfile +++ b/controlloop/packages/docker-controlloop/src/main/docker/Dockerfile @@ -3,21 +3,22 @@ FROM onap/policy-drools:1.4-SNAPSHOT-latest ARG BUILD_VERSION_APP_CL=${BUILD_VERSION_APP_CL} ENV BUILD_VERSION_APP_CL=${BUILD_VERSION_APP_CL} -SHELL ["/bin/bash", "-l", "-c"] +COPY apps-controlloop.zip ${POLICY_INSTALL}/ -COPY apps-controlloop.zip ./ RUN unzip apps-controlloop.zip && \ mkdir -p ${POLICY_HOME}/logs ${POLICY_HOME}/config ${HOME}/.m2 && \ tar -C ${POLICY_HOME} -xvf base-${BUILD_VERSION}.tar.gz --no-same-owner && \ tar -C ${POLICY_HOME} -xvf basex-controlloop-${BUILD_VERSION_APP_CL}.tar.gz --no-same-owner && \ unzip policy-management-${BUILD_VERSION}.zip -d ${POLICY_HOME} && \ echo "source ${POLICY_HOME}/etc/profile.d/env.sh" >> "${HOME}/.bashrc" && \ - sed -i -e 's!${{POLICY_HOME}}!'"${POLICY_HOME}!g" ${POLICY_HOME}/etc/profile.d/env.sh && \ chmod 700 ${POLICY_HOME}/bin/* && \ chmod 600 ${POLICY_HOME}/config/* && \ + chmod 700 ${POLICY_INSTALL}/*.sh && \ rm -f ${POLICY_INSTALL}/*.conf -RUN source ${POLICY_HOME}/etc/profile.d/env.sh && \ +COPY docker-entrypoint.sh ${POLICY_HOME}/bin/ + +RUN . ${POLICY_HOME}/etc/profile.d/env.sh && \ mvn org.apache.maven.plugins:maven-dependency-plugin:3.1.1:get \ --settings=${POLICY_HOME}/etc/m2/standalone-settings.xml \ -DartifactId=feature-controlloop-management \ @@ -30,4 +31,5 @@ RUN source ${POLICY_HOME}/etc/profile.d/env.sh && \ ${POLICY_HOME}/bin/features enable controlloop-amsterdam controlloop-casablanca && \ rm ${POLICY_INSTALL}/*.zip ${POLICY_INSTALL}/*.gz 2> /dev/null -CMD bash -l +ENTRYPOINT ["/opt/app/policy/bin/docker-entrypoint.sh"] +CMD ["boot"]
\ No newline at end of file |