Fix error caused by empty env TOPOURL
[sdnc/oam.git] / installation / sdnc-web / src / main / docker / Dockerfile
1 ###
2 #============LICENSE_START=======================================================
3 # ONAP : ccsdk distribution web
4 #  ================================================================================
5 # Copyright (C) 2020 highstreet technologies GmbH Intellectual Property.
6 # All rights reserved.
7 # ================================================================================
8 # Licensed under the Apache License, Version 2.0 (the "License");
9 # you may not use this file except in compliance with the License.
10 # You may obtain a copy of the License at
11 #
12 #      http://www.apache.org/licenses/LICENSE-2.0
13 #
14 # Unless required by applicable law or agreed to in writing, software
15 # distributed under the License is distributed on an "AS IS" BASIS,
16 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 # See the License for the specific language governing permissions and
18 # limitations under the License.
19 # ============LICENSE_END=========================================================
20 ###
21
22 # Base bitnami nginx image
23 FROM ${base.image.repo}
24 LABEL maintainer="CCSDK Team (onap-ccsdk@lists.onap.org)"
25
26 # copy ODLUX files to nginx
27 COPY html /opt/bitnami/nginx/html  
28
29 # copy site conf files 
30 COPY *.conf /opt/bitnami/nginx/conf/server_blocks/
31
32 # setup environment variables
33 ENV WEBPROTOCOL="HTTP" \
34     WEBPORT="8080" \
35     SDNRPROTOCOL="HTTP" \
36     SDNRHOST="172.18.0.3" \
37     SDNRPORT="8181" \
38     TRPCEURL="" \
39     TOPOURL="" \
40     TILEURL="" \
41     DNS_RESOLVER="1.1.1.1" \
42     SSL_CERT_DIR="/app/cert" \
43     SSL_CERTIFICATE="cert.pem" \
44     SSL_CERTIFICATE_KEY="cert.key"
45
46 # Check if /app can be used. If so, create "custom" directory and copy the files there.
47 COPY bin/*.sh /opt/bitnami/nginx/sbin/
48
49 USER root
50 RUN chmod +x /opt/bitnami/nginx/sbin/configure.sh /opt/bitnami/nginx/sbin/run.sh
51 # By default, docker copies files with the permissions of the build user. To avoid cases where build user 
52 # has 644 which can result in failure of certain commands
53 RUN chmod -R g+w /opt/bitnami/nginx/html/odlux
54
55 USER 1001
56 CMD [ "/opt/bitnami/nginx/sbin/run.sh" ]
57