blob: 681a58d4492f946a49412cd9d6c3ffefc47a0bae [file] [log] [blame]
danielhanrahan608e6252021-08-20 16:55:19 +01001#-------------------------------------------------------------------------------
2# ============LICENSE_START=======================================================
3# Copyright (C) 2021 Nordix Foundation.
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
21FROM onap/policy-jre-alpine:2.3.0
22
23LABEL maintainer="Policy Team"
24
25ARG POLICY_LOGS=/var/log/onap/policy/gui
26
27ENV POLICY_LOGS=$POLICY_LOGS
28ENV POLICY_HOME=$POLICY_HOME/gui
29ENV CLAMP_REST_URL=http://0.0.0.0
30
31RUN mkdir -p $POLICY_HOME $POLICY_LOGS $POLICY_HOME/bin $POLICY_HOME/lib && \
32 chown -R policy:policy $POLICY_HOME $POLICY_LOGS && \
33 apk update && \
34 apk add --no-cache gettext nginx
35
36WORKDIR $POLICY_HOME
37COPY policy-gui.sh ./bin/
38COPY /maven/gui-editor-apex-uber.jar ./lib/
39COPY /maven/gui-pdp-monitoring-uber.jar ./lib/
danielhanrahan1f680352021-09-08 10:49:44 +010040COPY etc/ssl/clamp.key /etc/ssl/clamp.key
41COPY etc/ssl/clamp.pem /etc/ssl/clamp.pem
danielhanrahan608e6252021-08-20 16:55:19 +010042COPY nginx/nginx.conf /etc/nginx/nginx.conf
43COPY nginx/default.conf.template /etc/nginx/templates/default.conf.template
44COPY nginx/index.html /usr/share/nginx/html/
danielhanrahana8af9622021-08-30 17:35:18 +010045ADD /maven/gui-clamp-html.tar.gz /usr/share/nginx/html/
46ADD /maven/gui-pdp-monitoring-html.tar.gz /usr/share/nginx/html/
danielhanrahan608e6252021-08-20 16:55:19 +010047RUN rm /etc/nginx/conf.d/default.conf && \
48 ln -sf /dev/stdout /var/log/nginx/access.log && \
49 ln -sf /dev/stderr /var/log/nginx/error.log && \
50 touch /var/run/nginx.pid && \
51 chown -R policy:policy . /etc/nginx /usr/share/nginx /var/lib/nginx /var/log/nginx /var/run/nginx.pid && \
52 chmod 755 bin/*.sh
53
54USER policy
55WORKDIR $POLICY_HOME/bin
56ENTRYPOINT [ "./policy-gui.sh" ]
danielhanrahan1f680352021-09-08 10:49:44 +010057EXPOSE 2443