Fix bug 1753: update keystone dockerfile to ubuntu 20.04
[osm/devops.git] / docker / Keystone / Dockerfile
1 # Copyright 2021 Whitestack, LLC
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License"); you may
4 # not use this file except in compliance with the License. You may obtain
5 # a copy of the License at
6 #
7 #         http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12 # License for the specific language governing permissions and limitations
13 # under the License.
14 #
15 # For those usages not covered by the Apache License, Version 2.0 please
16 # contact: fbravo@whitestack.com or glavado@whitestack.com
17 ##
18
19 FROM ubuntu:20.04
20
21 EXPOSE 5000
22
23 WORKDIR /keystone
24
25 COPY scripts/start.sh /keystone/start.sh
26
27 RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
28     DEBIAN_FRONTEND=noninteractive apt-get upgrade -y && \
29     DEBIAN_FRONTEND=noninteractive apt-get autoremove -y && \
30     DEBIAN_FRONTEND=noninteractive apt-get install -y software-properties-common && \
31     add-apt-repository -y cloud-archive:victoria && \
32     DEBIAN_FRONTEND=noninteractive apt-get update && \
33     DEBIAN_FRONTEND=noninteractive apt-get dist-upgrade -y && \
34     DEBIAN_FRONTEND=noninteractive apt-get install -y \
35     apache2=2.4.* \
36     keystone=2:18.0.* \
37     libapache2-mod-wsgi-py3=4.6.* \
38     python3-pip=20.0.* \
39     build-essential=12.8* \
40     python3-dev=3.8.* \
41     libldap2-dev=2.4.* \
42     libsasl2-dev=2.1.* \
43     libssl-dev=1.1.* \
44     libffi-dev=3.3* \
45     libxml2-dev=2.9.* \
46     libxslt1-dev=1.1.* \
47     zlib1g-dev=1:1.2.* \
48     ldap-utils=2.4.* \
49     curl=7.68.* \
50     net-tools=1.60* \
51     mysql-client=8.0.* \
52     dnsutils=1:9.16.* && \
53     rm -rf /var/lib/apt/lists/* && \
54     chmod +x start.sh
55
56 RUN pip3 install -U pip==21.3.1 && pip3 install python-ldap==3.2.0 ldappool==3.0.0
57
58 # database
59 ENV DB_HOST                 keystone-db
60 ENV DB_PORT                 3306
61 ENV ROOT_DB_USER            root
62 ENV ROOT_DB_PASSWORD        admin
63 ENV KEYSTONE_DB_PASSWORD    admin
64 # keystone
65 ENV REGION_ID               RegionOne
66 ENV KEYSTONE_HOST           keystone
67 # admin user
68 ENV ADMIN_USERNAME          admin
69 ENV ADMIN_PASSWORD          admin
70 ENV ADMIN_PROJECT           admin
71 # nbi service user
72 ENV SERVICE_USERNAME        nbi
73 ENV SERVICE_PASSWORD        nbi
74 ENV SERVICE_PROJECT         service
75 # ldap
76 # ENV LDAP_AUTHENTICATION_DOMAIN_NAME     no default
77 # ENV LDAP_URL                            ldap://localhost
78 # ENV LDAP_BIND_USER                      no default
79 # ENV LDAP_BIND_PASSWORD                  no default
80 # ENV LDAP_CHASE_REFERRALS                no default
81 # ENV LDAP_PAGE_SIZE                      0
82 # ENV LDAP_USER_TREE_DN                   no default
83 # ENV LDAP_USER_OBJECTCLASS               inetOrgPerson
84 # ENV LDAP_USER_ID_ATTRIBUTE              cn
85 # ENV LDAP_USER_NAME_ATTRIBUTE            sn
86 # ENV LDAP_USER_PASS_ATTRIBUTE            userPassword
87 # ENV LDAP_USER_FILTER                    no default
88 # ENV LDAP_USER_ENABLED_ATTRIBUTE         enabled
89 # ENV LDAP_USER_ENABLED_MASK              0
90 # ENV LDAP_USER_ENABLED_DEFAULT           true
91 # ENV LDAP_USER_ENABLED_INVERT            false
92 # ENV LDAP_GROUP_OBJECTCLASS              groupOfNames
93 # ENV LDAP_GROUP_TREE_DN                  no default
94 # ENV LDAP_USE_STARTTLS                   false
95 # ENV LDAP_TLS_CACERT_BASE64              no default
96 # ENV LDAP_TLS_REQ_CERT                   demand
97
98 ENTRYPOINT ["./start.sh"]