blob: fdd304659e0aafa20921a1cfa579fae375354d8a [file] [log] [blame]
Sirisha_Manchikanti18526e92021-06-01 16:48:25 +01001#-------------------------------------------------------------------------------
2# ============LICENSE_START=======================================================
liamfallone72ff812023-02-14 11:34:52 +00003# Copyright (C) 2021-2023 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
danielhanrahancd213592022-07-11 18:14:13 +010021FROM busybox AS tarball
22RUN mkdir /packages /extracted
23COPY /maven/lib/policy-clamp-runtime-acm.tar.gz /packages/
24RUN tar xvzf /packages/policy-clamp-runtime-acm.tar.gz --directory /extracted/
25
liamfallon046bb552023-11-13 13:29:00 +010026FROM onap/policy-jre-alpine:3.0.2
Sirisha_Manchikanti18526e92021-06-01 16:48:25 +010027
28LABEL maintainer="Policy Team"
danielhanrahan54c12dd2022-06-28 16:55:46 +010029LABEL org.opencontainers.image.title="Policy CLAMP ACM runtime"
30LABEL org.opencontainers.image.description="Policy CLAMP ACM runtime image based on Alpine"
31LABEL org.opencontainers.image.url="https://github.com/onap/policy-clamp"
32LABEL org.opencontainers.image.vendor="ONAP Policy Team"
33LABEL org.opencontainers.image.licenses="Apache-2.0"
34LABEL org.opencontainers.image.created="${git.build.time}"
35LABEL org.opencontainers.image.version="${git.build.version}"
36LABEL org.opencontainers.image.revision="${git.commit.id.abbrev}"
Sirisha_Manchikanti18526e92021-06-01 16:48:25 +010037
rameshiyer2761318022022-07-05 23:08:44 +010038ARG POLICY_LOGS=/var/log/onap/policy/policy-clamp-runtime-acm
Sirisha_Manchikanti18526e92021-06-01 16:48:25 +010039
40ENV POLICY_LOGS=$POLICY_LOGS
41ENV POLICY_HOME=$POLICY_HOME/clamp
42
liamfallone72ff812023-02-14 11:34:52 +000043USER root
danielhanrahancd213592022-07-11 18:14:13 +010044RUN mkdir -p $POLICY_HOME $POLICY_LOGS && \
45 chown -R policy:policy $POLICY_HOME $POLICY_LOGS
FrancescoFioraEst252a4bb2021-07-23 15:53:46 +010046
danielhanrahancd213592022-07-11 18:14:13 +010047COPY --chown=policy:policy --from=tarball /extracted $POLICY_HOME
Sirisha_Manchikanti18526e92021-06-01 16:48:25 +010048
49WORKDIR $POLICY_HOME
danielhanrahancd213592022-07-11 18:14:13 +010050COPY --chown=policy:policy acm-runtime.sh bin/
51COPY --chown=policy:policy /maven/policy-clamp-runtime-acm.jar /app/app.jar
Sirisha_Manchikanti18526e92021-06-01 16:48:25 +010052
danielhanrahancd213592022-07-11 18:14:13 +010053RUN chmod 755 bin/*.sh
Sirisha_Manchikanti18526e92021-06-01 16:48:25 +010054
rameshiyer273d8fc9a2021-11-05 14:24:02 +000055EXPOSE 6969
56
Sirisha_Manchikanti18526e92021-06-01 16:48:25 +010057USER policy
58WORKDIR $POLICY_HOME/bin
liamfallon43098042022-01-25 19:55:43 +000059ENTRYPOINT [ "./acm-runtime.sh" ]