danielhanrahan | 608e625 | 2021-08-20 16:55:19 +0100 | [diff] [blame] | 1 | #------------------------------------------------------------------------------- |
| 2 | # ============LICENSE_START======================================================= |
liamfallon | 58b16ab | 2023-02-14 11:33:42 +0000 | [diff] [blame^] | 3 | # Copyright (C) 2021-2023 Nordix Foundation. |
danielhanrahan | 608e625 | 2021-08-20 16:55:19 +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 | |
liamfallon | 5aa5a74 | 2022-12-16 12:30:26 +0000 | [diff] [blame] | 21 | FROM onap/policy-jre-alpine:2.6.1-SNAPSHOT |
danielhanrahan | 608e625 | 2021-08-20 16:55:19 +0100 | [diff] [blame] | 22 | |
| 23 | LABEL maintainer="Policy Team" |
danielhanrahan | 000b0c8 | 2022-06-28 14:37:30 +0100 | [diff] [blame] | 24 | LABEL org.opencontainers.image.title="Policy GUI" |
| 25 | LABEL org.opencontainers.image.description="Policy GUI image based on Alpine" |
| 26 | LABEL org.opencontainers.image.url="https://github.com/onap/policy-gui" |
| 27 | LABEL org.opencontainers.image.vendor="ONAP Policy Team" |
| 28 | LABEL org.opencontainers.image.licenses="Apache-2.0" |
| 29 | LABEL org.opencontainers.image.created="${git.build.time}" |
| 30 | LABEL org.opencontainers.image.version="${git.build.version}" |
| 31 | LABEL org.opencontainers.image.revision="${git.commit.id.abbrev}" |
danielhanrahan | 608e625 | 2021-08-20 16:55:19 +0100 | [diff] [blame] | 32 | |
| 33 | ARG POLICY_LOGS=/var/log/onap/policy/gui |
| 34 | |
| 35 | ENV POLICY_LOGS=$POLICY_LOGS |
| 36 | ENV POLICY_HOME=$POLICY_HOME/gui |
danielhanrahan | 608e625 | 2021-08-20 16:55:19 +0100 | [diff] [blame] | 37 | |
liamfallon | 58b16ab | 2023-02-14 11:33:42 +0000 | [diff] [blame^] | 38 | USER root |
danielhanrahan | e56f127 | 2022-01-28 11:41:38 +0000 | [diff] [blame] | 39 | RUN mkdir -p $POLICY_HOME $POLICY_LOGS $POLICY_HOME/bin $POLICY_HOME/etc/ssl && \ |
| 40 | chown -R policy:policy $POLICY_HOME $POLICY_LOGS |
danielhanrahan | 608e625 | 2021-08-20 16:55:19 +0100 | [diff] [blame] | 41 | |
danielhanrahan | e56f127 | 2022-01-28 11:41:38 +0000 | [diff] [blame] | 42 | COPY --chown=policy:policy /maven/app.jar /app/ |
danielhanrahan | 69d300a | 2021-09-08 17:55:13 +0100 | [diff] [blame] | 43 | COPY --chown=policy:policy policy-gui.sh $POLICY_HOME/bin/ |
danielhanrahan | e56f127 | 2022-01-28 11:41:38 +0000 | [diff] [blame] | 44 | COPY --chown=policy:policy config/application.yml $POLICY_HOME/etc/ |
| 45 | COPY --chown=policy:policy config/logback.xml $POLICY_HOME/etc/ |
| 46 | RUN chmod 755 $POLICY_HOME/bin/*.sh |
danielhanrahan | 608e625 | 2021-08-20 16:55:19 +0100 | [diff] [blame] | 47 | |
| 48 | USER policy |
| 49 | WORKDIR $POLICY_HOME/bin |
| 50 | ENTRYPOINT [ "./policy-gui.sh" ] |
danielhanrahan | 1f68035 | 2021-09-08 10:49:44 +0100 | [diff] [blame] | 51 | EXPOSE 2443 |