liamfallon | 755eb9d | 2020-01-22 12:11:11 +0000 | [diff] [blame] | 1 | #------------------------------------------------------------------------------- |
| 2 | # ============LICENSE_START======================================================= |
danielhanrahan | a7309ed | 2022-06-28 11:45:15 +0100 | [diff] [blame] | 3 | # Copyright (C) 2020-2022 Nordix Foundation. |
Jim Hahn | 6669d2b | 2021-08-25 11:44:58 -0400 | [diff] [blame] | 4 | # Modification Copyright (C) 2020-2021 AT&T Foundation. |
a.sreekumar | 1f47753 | 2021-02-23 15:45:34 +0000 | [diff] [blame] | 5 | # Modifications Copyright (C) 2021 Bell Canada. |
liamfallon | 755eb9d | 2020-01-22 12:11:11 +0000 | [diff] [blame] | 6 | # ================================================================================ |
| 7 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 8 | # you may not use this file except in compliance with the License. |
| 9 | # You may obtain a copy of the License at |
mmis | ef24b05 | 2018-07-10 10:50:05 +0100 | [diff] [blame] | 10 | # |
liamfallon | 755eb9d | 2020-01-22 12:11:11 +0000 | [diff] [blame] | 11 | # http://www.apache.org/licenses/LICENSE-2.0 |
mmis | ef24b05 | 2018-07-10 10:50:05 +0100 | [diff] [blame] | 12 | # |
liamfallon | 755eb9d | 2020-01-22 12:11:11 +0000 | [diff] [blame] | 13 | # Unless required by applicable law or agreed to in writing, software |
| 14 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 16 | # See the License for the specific language governing permissions and |
| 17 | # limitations under the License. |
| 18 | # |
| 19 | # SPDX-License-Identifier: Apache-2.0 |
| 20 | # ============LICENSE_END========================================================= |
| 21 | #------------------------------------------------------------------------------- |
| 22 | |
danielhanrahan | c0f36b8 | 2022-07-01 15:11:06 +0100 | [diff] [blame] | 23 | FROM busybox AS tarball |
| 24 | RUN mkdir /packages /extracted |
| 25 | COPY /maven/apex-pdp-package-full.tar.gz /packages/ |
| 26 | RUN tar xvzf /packages/apex-pdp-package-full.tar.gz --directory /extracted/ |
| 27 | |
rameshiyer27 | 9551484 | 2024-07-12 14:00:54 +0000 | [diff] [blame^] | 28 | FROM onap/policy-jdk-alpine:4.0.1-SNAPSHOT |
mmis | ef24b05 | 2018-07-10 10:50:05 +0100 | [diff] [blame] | 29 | |
Dmitry Puzikov | 1aac864 | 2019-03-25 10:47:23 +0100 | [diff] [blame] | 30 | LABEL maintainer="Policy Team" |
danielhanrahan | a7309ed | 2022-06-28 11:45:15 +0100 | [diff] [blame] | 31 | LABEL org.opencontainers.image.title="Policy APEX PDP" |
| 32 | LABEL org.opencontainers.image.description="Policy APEX PDP image based on Alpine" |
| 33 | LABEL org.opencontainers.image.url="https://github.com/onap/policy-apex-pdp" |
| 34 | LABEL org.opencontainers.image.vendor="ONAP Policy Team" |
| 35 | LABEL org.opencontainers.image.licenses="Apache-2.0" |
| 36 | LABEL org.opencontainers.image.created="${git.build.time}" |
| 37 | LABEL org.opencontainers.image.version="${git.build.version}" |
| 38 | LABEL org.opencontainers.image.revision="${git.commit.id.abbrev}" |
Dmitry Puzikov | 1aac864 | 2019-03-25 10:47:23 +0100 | [diff] [blame] | 39 | |
Dmitry Puzikov | 1aac864 | 2019-03-25 10:47:23 +0100 | [diff] [blame] | 40 | ARG POLICY_LOGS=/var/log/onap/policy/apex-pdp |
shaoqiu | ae257d1 | 2019-06-03 07:08:41 +0000 | [diff] [blame] | 41 | ENV POLICY_HOME=/opt/app/policy/apex-pdp |
Rashmi Pujar | 7b94541 | 2019-06-17 10:34:49 -0400 | [diff] [blame] | 42 | ENV POLICY_LOGS=$POLICY_LOGS |
danielhanrahan | 2e80c5d | 2022-10-25 16:14:16 +0100 | [diff] [blame] | 43 | ENV APEX_HOME=$POLICY_HOME |
| 44 | ENV APEX_USER=policy |
Dmitry Puzikov | 1aac864 | 2019-03-25 10:47:23 +0100 | [diff] [blame] | 45 | |
liamfallon | 0e906cd | 2023-02-14 11:36:16 +0000 | [diff] [blame] | 46 | USER root |
danielhanrahan | 2e80c5d | 2022-10-25 16:14:16 +0100 | [diff] [blame] | 47 | RUN mkdir -p $POLICY_HOME $POLICY_LOGS && \ |
| 48 | chown -R policy:policy $POLICY_HOME $POLICY_LOGS |
mmis | ef24b05 | 2018-07-10 10:50:05 +0100 | [diff] [blame] | 49 | |
danielhanrahan | 2e80c5d | 2022-10-25 16:14:16 +0100 | [diff] [blame] | 50 | COPY --chown=policy:policy --from=tarball /extracted $POLICY_HOME |
mmis | eed7a08 | 2018-07-17 00:30:34 +0100 | [diff] [blame] | 51 | |
danielhanrahan | 2e80c5d | 2022-10-25 16:14:16 +0100 | [diff] [blame] | 52 | USER $APEX_USER |
Rashmi Pujar | 7b94541 | 2019-06-17 10:34:49 -0400 | [diff] [blame] | 53 | ENV PATH $POLICY_HOME/bin:$PATH |
danielhanrahan | 2e80c5d | 2022-10-25 16:14:16 +0100 | [diff] [blame] | 54 | WORKDIR $APEX_HOME |
Ram Krishna Verma | 4d967d6 | 2021-03-23 13:03:52 -0400 | [diff] [blame] | 55 | ENTRYPOINT [ "/bin/sh" ] |