blob: 4ec29df60237264c8f3f9bede843f8ba7d3910ff [file] [log] [blame]
liamfallon755eb9d2020-01-22 12:11:11 +00001#-------------------------------------------------------------------------------
2# ============LICENSE_START=======================================================
danielhanrahana7309ed2022-06-28 11:45:15 +01003# Copyright (C) 2020-2022 Nordix Foundation.
Jim Hahn6669d2b2021-08-25 11:44:58 -04004# Modification Copyright (C) 2020-2021 AT&T Foundation.
a.sreekumar1f477532021-02-23 15:45:34 +00005# Modifications Copyright (C) 2021 Bell Canada.
liamfallon755eb9d2020-01-22 12:11:11 +00006# ================================================================================
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
mmisef24b052018-07-10 10:50:05 +010010#
liamfallon755eb9d2020-01-22 12:11:11 +000011# http://www.apache.org/licenses/LICENSE-2.0
mmisef24b052018-07-10 10:50:05 +010012#
liamfallon755eb9d2020-01-22 12:11:11 +000013# 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
danielhanrahanc0f36b82022-07-01 15:11:06 +010023FROM busybox AS tarball
24RUN mkdir /packages /extracted
25COPY /maven/apex-pdp-package-full.tar.gz /packages/
26RUN tar xvzf /packages/apex-pdp-package-full.tar.gz --directory /extracted/
27
rameshiyer2795514842024-07-12 14:00:54 +000028FROM onap/policy-jdk-alpine:4.0.1-SNAPSHOT
mmisef24b052018-07-10 10:50:05 +010029
Dmitry Puzikov1aac8642019-03-25 10:47:23 +010030LABEL maintainer="Policy Team"
danielhanrahana7309ed2022-06-28 11:45:15 +010031LABEL org.opencontainers.image.title="Policy APEX PDP"
32LABEL org.opencontainers.image.description="Policy APEX PDP image based on Alpine"
33LABEL org.opencontainers.image.url="https://github.com/onap/policy-apex-pdp"
34LABEL org.opencontainers.image.vendor="ONAP Policy Team"
35LABEL org.opencontainers.image.licenses="Apache-2.0"
36LABEL org.opencontainers.image.created="${git.build.time}"
37LABEL org.opencontainers.image.version="${git.build.version}"
38LABEL org.opencontainers.image.revision="${git.commit.id.abbrev}"
Dmitry Puzikov1aac8642019-03-25 10:47:23 +010039
Dmitry Puzikov1aac8642019-03-25 10:47:23 +010040ARG POLICY_LOGS=/var/log/onap/policy/apex-pdp
shaoqiuae257d12019-06-03 07:08:41 +000041ENV POLICY_HOME=/opt/app/policy/apex-pdp
Rashmi Pujar7b945412019-06-17 10:34:49 -040042ENV POLICY_LOGS=$POLICY_LOGS
danielhanrahan2e80c5d2022-10-25 16:14:16 +010043ENV APEX_HOME=$POLICY_HOME
44ENV APEX_USER=policy
Dmitry Puzikov1aac8642019-03-25 10:47:23 +010045
liamfallon0e906cd2023-02-14 11:36:16 +000046USER root
danielhanrahan2e80c5d2022-10-25 16:14:16 +010047RUN mkdir -p $POLICY_HOME $POLICY_LOGS && \
48 chown -R policy:policy $POLICY_HOME $POLICY_LOGS
mmisef24b052018-07-10 10:50:05 +010049
danielhanrahan2e80c5d2022-10-25 16:14:16 +010050COPY --chown=policy:policy --from=tarball /extracted $POLICY_HOME
mmiseed7a082018-07-17 00:30:34 +010051
danielhanrahan2e80c5d2022-10-25 16:14:16 +010052USER $APEX_USER
Rashmi Pujar7b945412019-06-17 10:34:49 -040053ENV PATH $POLICY_HOME/bin:$PATH
danielhanrahan2e80c5d2022-10-25 16:14:16 +010054WORKDIR $APEX_HOME
Ram Krishna Verma4d967d62021-03-23 13:03:52 -040055ENTRYPOINT [ "/bin/sh" ]