danielhanrahan | 608e625 | 2021-08-20 16:55:19 +0100 | [diff] [blame] | 1 | #------------------------------------------------------------------------------- |
| 2 | # ============LICENSE_START======================================================= |
danielhanrahan | e56f127 | 2022-01-28 11:41:38 +0000 | [diff] [blame] | 3 | # Copyright (C) 2021-2022 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 | 62ade24 | 2022-09-02 18:18:08 +0100 | [diff] [blame^] | 21 | FROM onap/policy-jre-alpine:2.4.4 |
danielhanrahan | 608e625 | 2021-08-20 16:55:19 +0100 | [diff] [blame] | 22 | |
| 23 | LABEL maintainer="Policy Team" |
| 24 | |
| 25 | ARG POLICY_LOGS=/var/log/onap/policy/gui |
| 26 | |
| 27 | ENV POLICY_LOGS=$POLICY_LOGS |
| 28 | ENV POLICY_HOME=$POLICY_HOME/gui |
danielhanrahan | 608e625 | 2021-08-20 16:55:19 +0100 | [diff] [blame] | 29 | |
danielhanrahan | e56f127 | 2022-01-28 11:41:38 +0000 | [diff] [blame] | 30 | RUN mkdir -p $POLICY_HOME $POLICY_LOGS $POLICY_HOME/bin $POLICY_HOME/etc/ssl && \ |
| 31 | chown -R policy:policy $POLICY_HOME $POLICY_LOGS |
danielhanrahan | 608e625 | 2021-08-20 16:55:19 +0100 | [diff] [blame] | 32 | |
danielhanrahan | e56f127 | 2022-01-28 11:41:38 +0000 | [diff] [blame] | 33 | COPY --chown=policy:policy /maven/app.jar /app/ |
danielhanrahan | 69d300a | 2021-09-08 17:55:13 +0100 | [diff] [blame] | 34 | COPY --chown=policy:policy policy-gui.sh $POLICY_HOME/bin/ |
danielhanrahan | e56f127 | 2022-01-28 11:41:38 +0000 | [diff] [blame] | 35 | COPY --chown=policy:policy config/application.yml $POLICY_HOME/etc/ |
| 36 | COPY --chown=policy:policy config/logback.xml $POLICY_HOME/etc/ |
| 37 | RUN chmod 755 $POLICY_HOME/bin/*.sh |
danielhanrahan | 608e625 | 2021-08-20 16:55:19 +0100 | [diff] [blame] | 38 | |
| 39 | USER policy |
| 40 | WORKDIR $POLICY_HOME/bin |
| 41 | ENTRYPOINT [ "./policy-gui.sh" ] |
danielhanrahan | 1f68035 | 2021-09-08 10:49:44 +0100 | [diff] [blame] | 42 | EXPOSE 2443 |