1 #-------------------------------------------------------------------------------
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
11 # http://www.apache.org/licenses/LICENSE-2.0
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.
19 # SPDX-License-Identifier: Apache-2.0
20 # ============LICENSE_END=========================================================
21 #-------------------------------------------------------------------------------
23 FROM onap/policy-jre-alpine:2.4.1
25 LABEL maintainer="Policy Team"
27 ARG POLICY_LOGS=/var/log/onap/policy/pap
29 ENV POLICY_LOGS=$POLICY_LOGS
30 ENV POLICY_HOME=$POLICY_HOME/pap
32 RUN mkdir -p $POLICY_HOME $POLICY_LOGS $POLICY_HOME/bin && \
33 chown -R policy:policy $POLICY_HOME $POLICY_LOGS && \
35 COPY /maven/lib/policy-pap.tar.gz /packages
37 RUN tar xvfz /packages/policy-pap.tar.gz --directory $POLICY_HOME \
38 && rm /packages/policy-pap.tar.gz
41 COPY policy-pap.sh bin/.
42 COPY /maven/pap.jar /app
45 RUN chown -R policy:policy * && chmod 755 bin/*.sh && chown -R policy:policy /app
48 WORKDIR $POLICY_HOME/bin
49 ENTRYPOINT [ "./policy-pap.sh" ]