blob: b1aef14efeec6e2d129c8811fe24c9a10870a5c6 [file] [log] [blame]
FrancescoFioraEstc50ee572023-06-13 17:05:39 +01001#-------------------------------------------------------------------------------
2# ============LICENSE_START=======================================================
3# Copyright (C) 2023 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
21FROM busybox AS tarball
22RUN mkdir /packages /extracted
23COPY /maven/lib/sim-participant.tar.gz /packages/
24RUN tar xvzf /packages/sim-participant.tar.gz --directory /extracted/
25
liamfallon858e2752023-11-13 16:41:50 +010026FROM onap/policy-jre-alpine:3.0.3-SNAPSHOT
FrancescoFioraEstc50ee572023-06-13 17:05:39 +010027
28LABEL maintainer="Policy Team"
29LABEL org.opencontainers.image.title="Policy CLAMP ACM Simulator Participant"
30LABEL org.opencontainers.image.description="Policy CLAMP ACM Simulator Participant 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}"
37
38ARG POLICY_LOGS=/var/log/onap/policy/sim-participant
39
40ENV POLICY_LOGS=$POLICY_LOGS
41ENV POLICY_HOME=$POLICY_HOME/clamp
42
43USER root
44RUN mkdir -p $POLICY_LOGS $POLICY_HOME && \
45 chown -R policy:policy $POLICY_HOME $POLICY_LOGS
46
47COPY --chown=policy:policy --from=tarball /extracted $POLICY_HOME
48
49WORKDIR $POLICY_HOME
50COPY --chown=policy:policy sim-participant.sh bin/
51COPY --chown=policy:policy /maven/policy-clamp-participant-impl-sim.jar /app/app.jar
52
53RUN chmod 755 bin/*.sh
54
55EXPOSE 8084
56
57USER policy
58WORKDIR $POLICY_HOME/bin
59ENTRYPOINT [ "./sim-participant.sh" ]