blob: f5571c443f196523c27bd377c0797fb7726c72dd [file] [log] [blame]
HOCKLAb8306062020-01-20 16:37:27 -06001FROM onap/policy-jre-alpine
mmis461cafd2018-09-05 10:35:44 +01002
Dmitry Puzikov39bac7e2019-03-25 15:16:04 +01003LABEL maintainer="Policy Team"
4
ramvermab5f49342019-02-05 15:34:35 +00005ARG POLICY_LOGS=/var/log/onap/policy/distribution
mmis461cafd2018-09-05 10:35:44 +01006
shaoqiu7c28dfd2019-06-26 04:08:11 +00007ENV POLICY_LOGS=$POLICY_LOGS
8ENV POLICY_HOME=$POLICY_HOME/distribution
mmis461cafd2018-09-05 10:35:44 +01009
shaoqiu7c28dfd2019-06-26 04:08:11 +000010RUN mkdir -p $POLICY_HOME $POLICY_LOGS $POLICY_HOME/bin && \
HOCKLAb8306062020-01-20 16:37:27 -060011 chown -R policy:policy $POLICY_HOME $POLICY_LOGS &&\
12 mkdir /packages
mmis461cafd2018-09-05 10:35:44 +010013
mmis461cafd2018-09-05 10:35:44 +010014COPY /maven/* /packages
shaoqiu7c28dfd2019-06-26 04:08:11 +000015RUN tar xvfz /packages/policy-distribution.tar.gz --directory $POLICY_HOME \
ning.xi11319a12019-03-06 03:32:53 +000016 && rm /packages/policy-distribution.tar.gz
mmis461cafd2018-09-05 10:35:44 +010017
shaoqiu7c28dfd2019-06-26 04:08:11 +000018WORKDIR $POLICY_HOME
mmis461cafd2018-09-05 10:35:44 +010019COPY policy-dist.sh bin/.
shaoqiu7c28dfd2019-06-26 04:08:11 +000020RUN chown -R policy:policy * && chmod 755 bin/*.sh
mmis461cafd2018-09-05 10:35:44 +010021
22USER policy
shaoqiu7c28dfd2019-06-26 04:08:11 +000023WORKDIR $POLICY_HOME/bin
mmis461cafd2018-09-05 10:35:44 +010024ENTRYPOINT [ "bash", "./policy-dist.sh" ]