Merge "DG changes for the closed loop and async support in MDONS"
[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 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 http_site.conf /opt/bitnami/nginx/conf/server_blocks/
31 COPY https_site.conf /opt/bitnami/nginx/conf/server_blocks/
32
33 # setup environment variables
34 ENV WEBPROTOCOL="HTTP" \
35         WEBPORT="8080" \
36         SDNRPROTOCOL="HTTP" \
37         SDNRHOST="172.18.0.3" \
38         SDNRPORT="8181" \
39         SSL_CERT_DIR="/app/cert" \
40         SSL_CERTIFICATE="cert.pem" \
41         SSL_CERTIFICATE_KEY="cert.key"
42
43 # Check if /app can be used. If so, create "custom" directory and copy the files there.
44 COPY bin/configure.sh /opt/bitnami/nginx/sbin
45 COPY bin/run.sh /opt/bitnami/nginx/sbin
46
47 USER root
48 RUN chmod +x /opt/bitnami/nginx/sbin/configure.sh
49 RUN chmod +x /opt/bitnami/nginx/sbin/run.sh
50 # By default, docker copies files with the permissions of the build user. To avoid cases where build user 
51 # has 644 which can result in failure of certain commands
52 RUN chmod -R g+w /opt/bitnami/nginx/html/odlux
53
54 USER 1001
55 CMD [ "/opt/bitnami/nginx/sbin/run.sh" ]
56