Pamela Dragosh | 7b63879 | 2020-03-01 17:00:36 -0500 | [diff] [blame] | 1 | FROM onap/policy-jre-alpine:2.0.1 |
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 && \ |
HOCKLA | b830606 | 2020-01-20 16:37:27 -0600 | [diff] [blame] | 11 | chown -R policy:policy $POLICY_HOME $POLICY_LOGS &&\ |
12 | mkdir /packages | ||||
mmis | 461cafd | 2018-09-05 10:35:44 +0100 | [diff] [blame] | 13 | |
mmis | 461cafd | 2018-09-05 10:35:44 +0100 | [diff] [blame] | 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" ] |