update references in policy/pap pom
[policy/pap.git] / packages / policy-pap-docker / src / main / docker / Dockerfile
1 #-------------------------------------------------------------------------------
2 # Dockerfile
3 # ============LICENSE_START=======================================================
4 #  Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
5 #  Modifications Copyright (C) 2021 Bell Canada. All rights reserved.
6 # ================================================================================
7 # Licensed under the Apache License, Version 2.0 (the "License");
8 # you may not use this file except in compliance with the License.
9 # You may obtain a copy of the License at
10 #
11 #      http://www.apache.org/licenses/LICENSE-2.0
12 #
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
18 #
19 # SPDX-License-Identifier: Apache-2.0
20 # ============LICENSE_END=========================================================
21 #-------------------------------------------------------------------------------
22
23 FROM onap/policy-jre-alpine:2.4.1
24
25 LABEL maintainer="Policy Team"
26
27 ARG POLICY_LOGS=/var/log/onap/policy/pap
28
29 ENV POLICY_LOGS=$POLICY_LOGS
30 ENV POLICY_HOME=$POLICY_HOME/pap
31
32 RUN mkdir -p $POLICY_HOME $POLICY_LOGS $POLICY_HOME/bin && \
33     chown  -R policy:policy $POLICY_HOME $POLICY_LOGS && \
34     mkdir /packages
35 COPY /maven/lib/policy-pap.tar.gz /packages
36
37 RUN tar xvfz /packages/policy-pap.tar.gz --directory $POLICY_HOME \
38     && rm /packages/policy-pap.tar.gz
39
40 WORKDIR $POLICY_HOME
41 COPY policy-pap.sh  bin/.
42 COPY /maven/pap.jar /app
43
44
45 RUN chown -R policy:policy * && chmod 755 bin/*.sh && chown -R policy:policy /app
46
47 USER policy
48 WORKDIR $POLICY_HOME/bin
49 ENTRYPOINT [ "./policy-pap.sh" ]