blob: 15aa16399c0ed5aa06502749f700f1f5d0e26a4e [file] [log] [blame]
danielhanrahan608e6252021-08-20 16:55:19 +01001#-------------------------------------------------------------------------------
2# ============LICENSE_START=======================================================
liamfallon58b16ab2023-02-14 11:33:42 +00003# Copyright (C) 2021-2023 Nordix Foundation.
danielhanrahan608e6252021-08-20 16:55:19 +01004# ================================================================================
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
liamfallon5aa5a742022-12-16 12:30:26 +000021FROM onap/policy-jre-alpine:2.6.1-SNAPSHOT
danielhanrahan608e6252021-08-20 16:55:19 +010022
23LABEL maintainer="Policy Team"
danielhanrahan000b0c82022-06-28 14:37:30 +010024LABEL org.opencontainers.image.title="Policy GUI"
25LABEL org.opencontainers.image.description="Policy GUI image based on Alpine"
26LABEL org.opencontainers.image.url="https://github.com/onap/policy-gui"
27LABEL org.opencontainers.image.vendor="ONAP Policy Team"
28LABEL org.opencontainers.image.licenses="Apache-2.0"
29LABEL org.opencontainers.image.created="${git.build.time}"
30LABEL org.opencontainers.image.version="${git.build.version}"
31LABEL org.opencontainers.image.revision="${git.commit.id.abbrev}"
danielhanrahan608e6252021-08-20 16:55:19 +010032
33ARG POLICY_LOGS=/var/log/onap/policy/gui
34
35ENV POLICY_LOGS=$POLICY_LOGS
36ENV POLICY_HOME=$POLICY_HOME/gui
danielhanrahan608e6252021-08-20 16:55:19 +010037
liamfallon58b16ab2023-02-14 11:33:42 +000038USER root
danielhanrahane56f1272022-01-28 11:41:38 +000039RUN mkdir -p $POLICY_HOME $POLICY_LOGS $POLICY_HOME/bin $POLICY_HOME/etc/ssl && \
40 chown -R policy:policy $POLICY_HOME $POLICY_LOGS
danielhanrahan608e6252021-08-20 16:55:19 +010041
danielhanrahane56f1272022-01-28 11:41:38 +000042COPY --chown=policy:policy /maven/app.jar /app/
danielhanrahan69d300a2021-09-08 17:55:13 +010043COPY --chown=policy:policy policy-gui.sh $POLICY_HOME/bin/
danielhanrahane56f1272022-01-28 11:41:38 +000044COPY --chown=policy:policy config/application.yml $POLICY_HOME/etc/
45COPY --chown=policy:policy config/logback.xml $POLICY_HOME/etc/
46RUN chmod 755 $POLICY_HOME/bin/*.sh
danielhanrahan608e6252021-08-20 16:55:19 +010047
48USER policy
49WORKDIR $POLICY_HOME/bin
50ENTRYPOINT [ "./policy-gui.sh" ]
danielhanrahan1f680352021-09-08 10:49:44 +010051EXPOSE 2443