blob: 54d268ce904bb8898dc8849c1a2f8307f89f95ee [file] [log] [blame]
Dmitry Puzikov39bac7e2019-03-25 15:16:04 +01001FROM onap/policy-common-alpine:1.4.0
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 && \
11 chown -R policy:policy $POLICY_HOME $POLICY_LOGS
mmis461cafd2018-09-05 10:35:44 +010012
13RUN mkdir /packages
14COPY /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" ]