aravind.est | bf6cc68 | 2022-11-21 15:26:58 +0000 | [diff] [blame] | 1 | #------------------------------------------------------------------------------- |
| 2 | # ============LICENSE_START======================================================= |
liamfallon | e72ff81 | 2023-02-14 11:34:52 +0000 | [diff] [blame] | 3 | # Copyright (C) 2021-2023 Nordix Foundation. |
aravind.est | bf6cc68 | 2022-11-21 15:26:58 +0000 | [diff] [blame] | 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 | FROM busybox AS tarball |
| 22 | RUN mkdir /packages /extracted |
| 23 | COPY /maven/lib/a1pms-participant.tar.gz /packages/ |
| 24 | RUN tar xvzf /packages/a1pms-participant.tar.gz --directory /extracted/ |
| 25 | |
liamfallon | 0b5e996 | 2022-12-15 16:19:55 +0000 | [diff] [blame] | 26 | FROM onap/policy-jre-alpine:2.6.1-SNAPSHOT |
aravind.est | bf6cc68 | 2022-11-21 15:26:58 +0000 | [diff] [blame] | 27 | |
| 28 | LABEL maintainer="Policy Team" |
| 29 | LABEL org.opencontainers.image.title="Policy CLAMP ACM A1 PMS Participant" |
| 30 | LABEL org.opencontainers.image.description="Policy CLAMP ACM A1 PMS Participant image based on Alpine" |
| 31 | LABEL org.opencontainers.image.url="https://github.com/onap/policy-clamp" |
| 32 | LABEL org.opencontainers.image.vendor="ONAP Policy Team" |
| 33 | LABEL org.opencontainers.image.licenses="Apache-2.0" |
| 34 | LABEL org.opencontainers.image.created="${git.build.time}" |
| 35 | LABEL org.opencontainers.image.version="${git.build.version}" |
| 36 | LABEL org.opencontainers.image.revision="${git.commit.id.abbrev}" |
| 37 | |
| 38 | ARG POLICY_LOGS=/var/log/onap/policy/a1pms-participant |
| 39 | |
| 40 | ENV POLICY_LOGS=$POLICY_LOGS |
| 41 | ENV POLICY_HOME=$POLICY_HOME/clamp |
| 42 | |
liamfallon | e72ff81 | 2023-02-14 11:34:52 +0000 | [diff] [blame] | 43 | USER root |
aravind.est | bf6cc68 | 2022-11-21 15:26:58 +0000 | [diff] [blame] | 44 | RUN mkdir -p $POLICY_LOGS $POLICY_HOME && \ |
| 45 | chown -R policy:policy $POLICY_HOME $POLICY_LOGS |
| 46 | |
| 47 | COPY --chown=policy:policy --from=tarball /extracted $POLICY_HOME |
| 48 | |
| 49 | WORKDIR $POLICY_HOME |
| 50 | COPY --chown=policy:policy a1pms-participant.sh bin/ |
| 51 | COPY --chown=policy:policy /maven/policy-clamp-participant-impl-a1pms.jar /app/app.jar |
| 52 | |
| 53 | RUN chmod 755 bin/*.sh |
| 54 | |
| 55 | EXPOSE 8086 |
| 56 | |
| 57 | USER policy |
| 58 | WORKDIR $POLICY_HOME/bin |
| 59 | ENTRYPOINT [ "./a1pms-participant.sh" ] |