blob: 970f8aacad50dd7dd85b7f491692cd8bbd4b00eb [file] [log] [blame]
rameshiyer27befb22b2021-09-06 12:16:56 +01001#-------------------------------------------------------------------------------
2# ============LICENSE_START=======================================================
3# Copyright (C) 2021 Nordix Foundation.
4# ================================================================================
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 HTTP Participant on Java 11 or better in alpine
rameshiyer27befb22b2021-09-06 12:16:56 +010023#
24
liamfallon928e6702022-04-27 20:55:39 +010025FROM onap/policy-jre-alpine:2.4.3
rameshiyer27befb22b2021-09-06 12:16:56 +010026
27LABEL maintainer="Policy Team"
28
29ARG POLICY_LOGS=/var/log/onap/policy/clamp
30
31ENV POLICY_LOGS=$POLICY_LOGS
32ENV POLICY_HOME=$POLICY_HOME/clamp
33
34RUN mkdir -p $POLICY_LOGS $POLICY_HOME $POLICY_HOME/bin && \
35 chown -R policy:policy $POLICY_HOME $POLICY_LOGS && \
36 mkdir /packages
37COPY /maven/lib/http-participant.tar.gz /packages
38
39RUN tar xvfz /packages/http-participant.tar.gz --directory $POLICY_HOME && \
40 rm /packages/http-participant.tar.gz
41
42WORKDIR $POLICY_HOME
43COPY http-participant.sh bin/.
liamfallon8040c952022-05-31 11:22:10 +010044COPY /maven/policy-clamp-participant-impl-http.jar /app/app.jar
rameshiyer27befb22b2021-09-06 12:16:56 +010045
46RUN chown -R policy:policy * && \
47 chmod 755 bin/*.sh && \
48 chown -R policy:policy /app
49
rameshiyer273d8fc9a2021-11-05 14:24:02 +000050EXPOSE 8084
51
rameshiyer27befb22b2021-09-06 12:16:56 +010052USER policy
53WORKDIR $POLICY_HOME/bin
54ENTRYPOINT [ "./http-participant.sh" ]