diff options
author | shaoqiu <tim.huang@est.tech> | 2019-06-26 04:08:11 +0000 |
---|---|---|
committer | shaoqiu <tim.huang@est.tech> | 2019-06-26 04:08:11 +0000 |
commit | 7c28dfddd22389f87d649f9981d7ddd917088a87 (patch) | |
tree | 400c55884499a41221447f7ad30c5658a6e76927 /packages/policy-distribution-docker/src/main/docker/Dockerfile | |
parent | 00d6cceb92b2dd60a626406370ea5a1473ee56ca (diff) |
Remove POLICY_DISTRIBUTION_HOME in Dockerfile
Update the policy-dist.sh and Dockerfile according to the comments in
commit: https://gerrit.onap.org/r/c/policy/api/+/89972
Issue-ID: POLICY-1702
Change-Id: Ia3d2ce356baac3a657da879fb9ccf5eefd2a9624
Signed-off-by: shaoqiu <tim.huang@est.tech>
Diffstat (limited to 'packages/policy-distribution-docker/src/main/docker/Dockerfile')
-rw-r--r-- | packages/policy-distribution-docker/src/main/docker/Dockerfile | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/packages/policy-distribution-docker/src/main/docker/Dockerfile b/packages/policy-distribution-docker/src/main/docker/Dockerfile index db26c161..54d268ce 100644 --- a/packages/policy-distribution-docker/src/main/docker/Dockerfile +++ b/packages/policy-distribution-docker/src/main/docker/Dockerfile @@ -4,23 +4,21 @@ LABEL maintainer="Policy Team" ARG POLICY_LOGS=/var/log/onap/policy/distribution -ENV POLICY_LOGS ${POLICY_LOGS} -ENV POLICY_DISTRIBUTION_HOME=${POLICY_HOME}/distribution +ENV POLICY_LOGS=$POLICY_LOGS +ENV POLICY_HOME=$POLICY_HOME/distribution -RUN mkdir -p ${POLICY_DISTRIBUTION_HOME} ${POLICY_LOGS} ${POLICY_DISTRIBUTION_HOME}/bin && \ - chown -R policy:policy ${POLICY_DISTRIBUTION_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-distribution.tar.gz --directory ${POLICY_DISTRIBUTION_HOME} \ +RUN tar xvfz /packages/policy-distribution.tar.gz --directory $POLICY_HOME \ && rm /packages/policy-distribution.tar.gz -WORKDIR ${POLICY_DISTRIBUTION_HOME} +WORKDIR $POLICY_HOME COPY policy-dist.sh bin/. -RUN chown -R policy:policy * && chmod +x bin/*.sh \ - && cp ${POLICY_DISTRIBUTION_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_DISTRIBUTION_HOME}/bin +WORKDIR $POLICY_HOME/bin ENTRYPOINT [ "bash", "./policy-dist.sh" ] |