1 #######################################################################################
2 # Copyright ETSI Contributors and Others.
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16 #######################################################################################
20 RUN if [ ! -z $APT_PROXY ] ; then \
21 echo "Acquire::http::Proxy \"$APT_PROXY\";" > /etc/apt/apt.conf.d/proxy.conf ;\
22 echo "Acquire::https::Proxy \"$APT_PROXY\";" >> /etc/apt/apt.conf.d/proxy.conf ;\
29 COPY scripts/start.sh /app/start.sh
31 RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
32 DEBIAN_FRONTEND=noninteractive apt-get upgrade -y && \
33 DEBIAN_FRONTEND=noninteractive apt-get autoremove -y && \
34 DEBIAN_FRONTEND=noninteractive apt-get install -y software-properties-common && \
35 add-apt-repository -y cloud-archive:antelope && \
36 DEBIAN_FRONTEND=noninteractive apt-get update && \
37 DEBIAN_FRONTEND=noninteractive apt-get dist-upgrade -y && \
38 DEBIAN_FRONTEND=noninteractive apt-get install -y \
41 libapache2-mod-wsgi-py3=4.9.* \
43 build-essential=12.9* \
56 dnsutils=1:9.18.* && \
57 rm -rf /var/lib/apt/lists/* && \
60 RUN pip3 install python-ldap==3.2.0 ldappool==3.0.0 python-openstackclient==6.2.0
62 # Creating the user for the app
63 RUN groupadd -g 1000 appuser && \
64 useradd -u 1000 -g 1000 -d /app appuser && \
65 usermod -a -G keystone appuser && \
66 usermod -a -G adm appuser && \
67 chown -R appuser:appuser /app && \
68 chown root:keystone /etc/keystone && \
69 chmod 770 /etc/keystone && \
70 chown root:keystone /etc/ssl/certs && \
71 chmod 770 /etc/ssl/certs && \
72 chown root:keystone /etc/apache2/apache2.conf && \
73 chmod 664 /etc/apache2/apache2.conf && \
74 sed -i 's/Listen 80/Listen 8080/g' /etc/apache2/ports.conf && \
75 chown root:keystone /var/spool && \
76 chmod 775 /var/spool && \
77 chmod 770 /var/log/apache2 && \
78 chmod 660 /var/log/apache2/* && \
79 chmod 770 /var/log/keystone && \
80 chown root:keystone /var/run/apache2 && \
81 chmod 775 /var/run/apache2 && \
82 mkdir -p /etc/sudoers.d && \
83 echo "%appuser ALL= NOPASSWD: /sbin/service apache2 *" > /etc/sudoers.d/appuser
88 ENV DB_HOST keystone-db
91 ENV ROOT_DB_PASSWORD admin
92 ENV KEYSTONE_DB_PASSWORD admin
94 ENV REGION_ID RegionOne
95 ENV KEYSTONE_HOST keystone
97 ENV ADMIN_USERNAME admin
98 ENV ADMIN_PASSWORD admin
99 ENV ADMIN_PROJECT admin
101 ENV SERVICE_USERNAME nbi
102 ENV SERVICE_PASSWORD nbi
103 ENV SERVICE_PROJECT service
105 # ENV LDAP_AUTHENTICATION_DOMAIN_NAME no default
106 # ENV LDAP_URL ldap://localhost
107 # ENV LDAP_BIND_USER no default
108 # ENV LDAP_BIND_PASSWORD no default
109 # ENV LDAP_CHASE_REFERRALS no default
110 # ENV LDAP_PAGE_SIZE 0
111 # ENV LDAP_USER_TREE_DN no default
112 # ENV LDAP_USER_OBJECTCLASS inetOrgPerson
113 # ENV LDAP_USER_ID_ATTRIBUTE cn
114 # ENV LDAP_USER_NAME_ATTRIBUTE sn
115 # ENV LDAP_USER_PASS_ATTRIBUTE userPassword
116 # ENV LDAP_USER_FILTER no default
117 # ENV LDAP_USER_ENABLED_ATTRIBUTE enabled
118 # ENV LDAP_USER_ENABLED_MASK 0
119 # ENV LDAP_USER_ENABLED_DEFAULT true
120 # ENV LDAP_USER_ENABLED_INVERT false
121 # ENV LDAP_GROUP_OBJECTCLASS groupOfNames
122 # ENV LDAP_GROUP_TREE_DN no default
123 # ENV LDAP_USE_STARTTLS false
124 # ENV LDAP_TLS_CACERT_BASE64 no default
125 # ENV LDAP_TLS_REQ_CERT demand
127 ENTRYPOINT ["./start.sh"]