blob: be831c55404edcf6b26f0ef4e9edbaae60bdd478 [file] [log] [blame]
Sirisha_Manchikanti18526e92021-06-01 16:48:25 +01001#-------------------------------------------------------------------------------
2# ============LICENSE_START=======================================================
danielhanrahan54c12dd2022-06-28 16:55:46 +01003# Copyright (C) 2021-2022 Nordix Foundation.
Sirisha_Manchikanti18526e92021-06-01 16:48:25 +01004# ================================================================================
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16#
17# SPDX-License-Identifier: Apache-2.0
18# ============LICENSE_END=========================================================
19#-------------------------------------------------------------------------------
20
21#
liamfallon43098042022-01-25 19:55:43 +000022# Docker file to build an image that runs the CLAMP ACM Policy Framework Participant on Java 11 or better in alpine
Sirisha_Manchikanti18526e92021-06-01 16:48:25 +010023#
liamfallon928e6702022-04-27 20:55:39 +010024FROM onap/policy-jre-alpine:2.4.3
Sirisha_Manchikanti18526e92021-06-01 16:48:25 +010025
26LABEL maintainer="Policy Team"
danielhanrahan54c12dd2022-06-28 16:55:46 +010027LABEL org.opencontainers.image.title="Policy CLAMP ACM Policy Framework Participant"
28LABEL org.opencontainers.image.description="Policy CLAMP ACM Policy Framework Participant image based on Alpine"
29LABEL org.opencontainers.image.url="https://github.com/onap/policy-clamp"
30LABEL org.opencontainers.image.vendor="ONAP Policy Team"
31LABEL org.opencontainers.image.licenses="Apache-2.0"
32LABEL org.opencontainers.image.created="${git.build.time}"
33LABEL org.opencontainers.image.version="${git.build.version}"
34LABEL org.opencontainers.image.revision="${git.commit.id.abbrev}"
Sirisha_Manchikanti18526e92021-06-01 16:48:25 +010035
36ARG POLICY_LOGS=/var/log/onap/policy/clamp
37
38ENV POLICY_LOGS=$POLICY_LOGS
39ENV POLICY_HOME=$POLICY_HOME/clamp
40
41RUN mkdir -p $POLICY_LOGS $POLICY_HOME $POLICY_HOME/bin && \
42 chown -R policy:policy $POLICY_HOME $POLICY_LOGS && \
43 mkdir /packages
44COPY /maven/lib/policy-participant.tar.gz /packages
FrancescoFioraEst252a4bb2021-07-23 15:53:46 +010045
Sirisha_Manchikanti18526e92021-06-01 16:48:25 +010046RUN tar xvfz /packages/policy-participant.tar.gz --directory $POLICY_HOME && \
FrancescoFioraEst252a4bb2021-07-23 15:53:46 +010047 rm /packages/policy-participant.tar.gz
Sirisha_Manchikanti18526e92021-06-01 16:48:25 +010048
49WORKDIR $POLICY_HOME
50COPY policy-participant.sh bin/.
liamfallon8040c952022-05-31 11:22:10 +010051COPY /maven/policy-clamp-participant-impl-policy.jar /app/app.jar
Sirisha_Manchikanti18526e92021-06-01 16:48:25 +010052
FrancescoFioraEst252a4bb2021-07-23 15:53:46 +010053RUN chown -R policy:policy * && \
54 chmod 755 bin/*.sh && \
Sirisha_Manchikanti18526e92021-06-01 16:48:25 +010055 chown -R policy:policy /app
56
rameshiyer273d8fc9a2021-11-05 14:24:02 +000057EXPOSE 8085
58
Sirisha_Manchikanti18526e92021-06-01 16:48:25 +010059USER policy
60WORKDIR $POLICY_HOME/bin
61ENTRYPOINT [ "./policy-participant.sh" ]