Dmitry Puzikov | 91d017c | 2019-04-01 14:39:15 +0200 | [diff] [blame] | 1 | FROM onap/policy-common-alpine:1.4.0 |
Chenfei Gao | 6ea2e1b | 2019-01-31 16:09:09 -0500 | [diff] [blame] | 2 | |
Dmitry Puzikov | a0745a7 | 2019-03-25 15:00:06 +0100 | [diff] [blame] | 3 | LABEL maintainer="Policy Team" |
4 | |||||
Chenfei Gao | 6ea2e1b | 2019-01-31 16:09:09 -0500 | [diff] [blame] | 5 | ARG POLICY_LOGS=/var/log/onap/policy/api |
6 | |||||
shaoqiu | d0fe049 | 2019-06-25 06:10:52 +0000 | [diff] [blame^] | 7 | ENV POLICY_LOGS=$POLICY_LOGS |
8 | ENV POLICY_HOME=$POLICY_HOME/api | ||||
Chenfei Gao | 6ea2e1b | 2019-01-31 16:09:09 -0500 | [diff] [blame] | 9 | |
shaoqiu | d0fe049 | 2019-06-25 06:10:52 +0000 | [diff] [blame^] | 10 | RUN mkdir -p $POLICY_LOGS $POLICY_HOME $POLICY_HOME/bin && \ |
11 | chown -R policy:policy $POLICY_HOME $POLICY_LOGS | ||||
Chenfei Gao | 6ea2e1b | 2019-01-31 16:09:09 -0500 | [diff] [blame] | 12 | |
13 | RUN mkdir /packages | ||||
14 | COPY /maven/* /packages | ||||
shaoqiu | d0fe049 | 2019-06-25 06:10:52 +0000 | [diff] [blame^] | 15 | RUN tar xvfz /packages/policy-api.tar.gz --directory $POLICY_HOME && \ |
shaoqiu | f626b9f | 2019-03-06 05:37:04 +0000 | [diff] [blame] | 16 | rm /packages/policy-api.tar.gz |
Chenfei Gao | 6ea2e1b | 2019-01-31 16:09:09 -0500 | [diff] [blame] | 17 | |
shaoqiu | d0fe049 | 2019-06-25 06:10:52 +0000 | [diff] [blame^] | 18 | WORKDIR $POLICY_HOME |
Chenfei Gao | 6ea2e1b | 2019-01-31 16:09:09 -0500 | [diff] [blame] | 19 | COPY policy-api.sh bin/. |
shaoqiu | d0fe049 | 2019-06-25 06:10:52 +0000 | [diff] [blame^] | 20 | |
21 | RUN chown -R policy:policy * && chmod 755 bin/*.sh | ||||
Chenfei Gao | 6ea2e1b | 2019-01-31 16:09:09 -0500 | [diff] [blame] | 22 | |
23 | USER policy | ||||
shaoqiu | d0fe049 | 2019-06-25 06:10:52 +0000 | [diff] [blame^] | 24 | WORKDIR $POLICY_HOME/bin |
Chenfei Gao | 6ea2e1b | 2019-01-31 16:09:09 -0500 | [diff] [blame] | 25 | ENTRYPOINT [ "bash", "./policy-api.sh" ] |