blob: c9e36d023b0c922a78d6b14a316079101a13ef3a [file] [log] [blame]
Dmitry Puzikov91d017c2019-04-01 14:39:15 +02001FROM onap/policy-common-alpine:1.4.0
Chenfei Gao6ea2e1b2019-01-31 16:09:09 -05002
Dmitry Puzikova0745a72019-03-25 15:00:06 +01003LABEL maintainer="Policy Team"
4
Chenfei Gao6ea2e1b2019-01-31 16:09:09 -05005ARG POLICY_LOGS=/var/log/onap/policy/api
6
shaoqiud0fe0492019-06-25 06:10:52 +00007ENV POLICY_LOGS=$POLICY_LOGS
8ENV POLICY_HOME=$POLICY_HOME/api
Chenfei Gao6ea2e1b2019-01-31 16:09:09 -05009
shaoqiud0fe0492019-06-25 06:10:52 +000010RUN mkdir -p $POLICY_LOGS $POLICY_HOME $POLICY_HOME/bin && \
11 chown -R policy:policy $POLICY_HOME $POLICY_LOGS
Chenfei Gao6ea2e1b2019-01-31 16:09:09 -050012
13RUN mkdir /packages
14COPY /maven/* /packages
shaoqiud0fe0492019-06-25 06:10:52 +000015RUN tar xvfz /packages/policy-api.tar.gz --directory $POLICY_HOME && \
shaoqiuf626b9f2019-03-06 05:37:04 +000016 rm /packages/policy-api.tar.gz
Chenfei Gao6ea2e1b2019-01-31 16:09:09 -050017
shaoqiud0fe0492019-06-25 06:10:52 +000018WORKDIR $POLICY_HOME
Chenfei Gao6ea2e1b2019-01-31 16:09:09 -050019COPY policy-api.sh bin/.
shaoqiud0fe0492019-06-25 06:10:52 +000020
21RUN chown -R policy:policy * && chmod 755 bin/*.sh
Chenfei Gao6ea2e1b2019-01-31 16:09:09 -050022
23USER policy
shaoqiud0fe0492019-06-25 06:10:52 +000024WORKDIR $POLICY_HOME/bin
Chenfei Gao6ea2e1b2019-01-31 16:09:09 -050025ENTRYPOINT [ "bash", "./policy-api.sh" ]