rameshiyer27 | befb22b | 2021-09-06 12:16:56 +0100 | [diff] [blame] | 1 | #------------------------------------------------------------------------------- |
| 2 | # ============LICENSE_START======================================================= |
danielhanrahan | 54c12dd | 2022-06-28 16:55:46 +0100 | [diff] [blame] | 3 | # Copyright (C) 2021-2022 Nordix Foundation. |
rameshiyer27 | befb22b | 2021-09-06 12:16:56 +0100 | [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 | # |
liamfallon | 4309804 | 2022-01-25 19:55:43 +0000 | [diff] [blame] | 22 | # Docker file to build an image that runs the CLAMP ACM HTTP Participant on Java 11 or better in alpine |
rameshiyer27 | befb22b | 2021-09-06 12:16:56 +0100 | [diff] [blame] | 23 | # |
| 24 | |
liamfallon | 928e670 | 2022-04-27 20:55:39 +0100 | [diff] [blame] | 25 | FROM onap/policy-jre-alpine:2.4.3 |
rameshiyer27 | befb22b | 2021-09-06 12:16:56 +0100 | [diff] [blame] | 26 | |
| 27 | LABEL maintainer="Policy Team" |
danielhanrahan | 54c12dd | 2022-06-28 16:55:46 +0100 | [diff] [blame] | 28 | LABEL org.opencontainers.image.title="Policy CLAMP ACM HTTP Participant" |
| 29 | LABEL org.opencontainers.image.description="Policy CLAMP ACM HTTP Participant image based on Alpine" |
| 30 | LABEL org.opencontainers.image.url="https://github.com/onap/policy-clamp" |
| 31 | LABEL org.opencontainers.image.vendor="ONAP Policy Team" |
| 32 | LABEL org.opencontainers.image.licenses="Apache-2.0" |
| 33 | LABEL org.opencontainers.image.created="${git.build.time}" |
| 34 | LABEL org.opencontainers.image.version="${git.build.version}" |
| 35 | LABEL org.opencontainers.image.revision="${git.commit.id.abbrev}" |
rameshiyer27 | befb22b | 2021-09-06 12:16:56 +0100 | [diff] [blame] | 36 | |
rameshiyer27 | 6131802 | 2022-07-05 23:08:44 +0100 | [diff] [blame^] | 37 | ARG POLICY_LOGS=/var/log/onap/policy/http-participant |
rameshiyer27 | befb22b | 2021-09-06 12:16:56 +0100 | [diff] [blame] | 38 | |
| 39 | ENV POLICY_LOGS=$POLICY_LOGS |
| 40 | ENV POLICY_HOME=$POLICY_HOME/clamp |
| 41 | |
| 42 | RUN mkdir -p $POLICY_LOGS $POLICY_HOME $POLICY_HOME/bin && \ |
| 43 | chown -R policy:policy $POLICY_HOME $POLICY_LOGS && \ |
| 44 | mkdir /packages |
| 45 | COPY /maven/lib/http-participant.tar.gz /packages |
| 46 | |
| 47 | RUN tar xvfz /packages/http-participant.tar.gz --directory $POLICY_HOME && \ |
| 48 | rm /packages/http-participant.tar.gz |
| 49 | |
| 50 | WORKDIR $POLICY_HOME |
| 51 | COPY http-participant.sh bin/. |
liamfallon | 8040c95 | 2022-05-31 11:22:10 +0100 | [diff] [blame] | 52 | COPY /maven/policy-clamp-participant-impl-http.jar /app/app.jar |
rameshiyer27 | befb22b | 2021-09-06 12:16:56 +0100 | [diff] [blame] | 53 | |
| 54 | RUN chown -R policy:policy * && \ |
| 55 | chmod 755 bin/*.sh && \ |
| 56 | chown -R policy:policy /app |
| 57 | |
rameshiyer27 | 3d8fc9a | 2021-11-05 14:24:02 +0000 | [diff] [blame] | 58 | EXPOSE 8084 |
| 59 | |
rameshiyer27 | befb22b | 2021-09-06 12:16:56 +0100 | [diff] [blame] | 60 | USER policy |
| 61 | WORKDIR $POLICY_HOME/bin |
| 62 | ENTRYPOINT [ "./http-participant.sh" ] |