Dmitry Puzikov | 39bac7e | 2019-03-25 15:16:04 +0100 | [diff] [blame] | 1 | FROM onap/policy-common-alpine:1.4.0 |
mmis | 461cafd | 2018-09-05 10:35:44 +0100 | [diff] [blame] | 2 | |
Dmitry Puzikov | 39bac7e | 2019-03-25 15:16:04 +0100 | [diff] [blame] | 3 | LABEL maintainer="Policy Team" |
4 | |||||
ramverma | b5f4934 | 2019-02-05 15:34:35 +0000 | [diff] [blame] | 5 | ARG POLICY_LOGS=/var/log/onap/policy/distribution |
mmis | 461cafd | 2018-09-05 10:35:44 +0100 | [diff] [blame] | 6 | |
shaoqiu | 7c28dfd | 2019-06-26 04:08:11 +0000 | [diff] [blame] | 7 | ENV POLICY_LOGS=$POLICY_LOGS |
8 | ENV POLICY_HOME=$POLICY_HOME/distribution | ||||
mmis | 461cafd | 2018-09-05 10:35:44 +0100 | [diff] [blame] | 9 | |
shaoqiu | 7c28dfd | 2019-06-26 04:08:11 +0000 | [diff] [blame] | 10 | RUN mkdir -p $POLICY_HOME $POLICY_LOGS $POLICY_HOME/bin && \ |
11 | chown -R policy:policy $POLICY_HOME $POLICY_LOGS | ||||
mmis | 461cafd | 2018-09-05 10:35:44 +0100 | [diff] [blame] | 12 | |
13 | RUN mkdir /packages | ||||
14 | COPY /maven/* /packages | ||||
shaoqiu | 7c28dfd | 2019-06-26 04:08:11 +0000 | [diff] [blame] | 15 | RUN tar xvfz /packages/policy-distribution.tar.gz --directory $POLICY_HOME \ |
ning.xi | 11319a1 | 2019-03-06 03:32:53 +0000 | [diff] [blame] | 16 | && rm /packages/policy-distribution.tar.gz |
mmis | 461cafd | 2018-09-05 10:35:44 +0100 | [diff] [blame] | 17 | |
shaoqiu | 7c28dfd | 2019-06-26 04:08:11 +0000 | [diff] [blame] | 18 | WORKDIR $POLICY_HOME |
mmis | 461cafd | 2018-09-05 10:35:44 +0100 | [diff] [blame] | 19 | COPY policy-dist.sh bin/. |
shaoqiu | 7c28dfd | 2019-06-26 04:08:11 +0000 | [diff] [blame] | 20 | RUN chown -R policy:policy * && chmod 755 bin/*.sh |
mmis | 461cafd | 2018-09-05 10:35:44 +0100 | [diff] [blame] | 21 | |
22 | USER policy | ||||
shaoqiu | 7c28dfd | 2019-06-26 04:08:11 +0000 | [diff] [blame] | 23 | WORKDIR $POLICY_HOME/bin |
mmis | 461cafd | 2018-09-05 10:35:44 +0100 | [diff] [blame] | 24 | ENTRYPOINT [ "bash", "./policy-dist.sh" ] |