aboutsummaryrefslogtreecommitdiff
path: root/docker/openstack-base/Dockerfile.j2
blob: 900fc3b4dd0be49a90358306a962914090154e50 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }}
MAINTAINER {{ maintainer }}

{% if base_distro in ['fedora', 'centos', 'oraclelinux', 'rhel'] %}
RUN yum -y install \
        git \
        iproute \
        mariadb-libs \
        MySQL-python \
        openssl \
    && yum clean all
{% endif %}

{% if install_type == 'binary' %}
    {% if base_distro in ['fedora', 'centos', 'oraclelinux', 'rhel'] %}

RUN yum -y install \
        python-barbicanclient \
        python-ceilometerclient \
        python-congressclient \
        python-designateclient \
        python-heatclient \
        python-ironicclient \
        python-magnumclient \
        python-manilaclient \
        python-mistralclient \
        python-muranoclient \
        python-pip \
        python-saharaclient \
        python-swiftclient \
        python-troveclient \
        python-tuskarclient \
        python-zaqarclient \
        python-openstackclient \
        MySQL-python \
        python-keystoneauth1 \
    && yum clean all

    {% endif %}
{% elif install_type == 'source' %}
    {% if base_distro in ['fedora', 'centos', 'oraclelinux', 'rhel'] %}

RUN yum -y install \
        gcc \
        gcc-c++ \
        libffi-devel \
        libxml2-devel \
        libxslt-devel \
        mariadb-devel \
        openldap-devel \
        openssl-devel \
        postgresql \
        postgresql-devel \
        python-devel \
        sqlite-devel \
    && yum clean all

    {% elif base_distro in ['ubuntu', 'debian'] %}

RUN apt-get install -y --no-install-recommends \
        ca-certificates \
        build-essential \
        python-dev \
        libssl-dev \
        libmariadbclient-dev \
        libxslt1-dev \
        libffi-dev \
        libyaml-dev \
        pkg-config \
        git \
    && apt-get clean

    {% endif %}

ADD openstack-base-archive /openstack-base-source
RUN ln -s openstack-base-source/* /requirements \
    && mkdir /var/lib/kolla \
    && curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \
    && python get-pip.py \
    && rm get-pip.py \
    && pip install -U virtualenv \
    && virtualenv /var/lib/kolla/venv \
    && /var/lib/kolla/venv/bin/pip --no-cache-dir install -U -c requirements/upper-constraints.txt \
        python-barbicanclient \
        python-ceilometerclient \
        python-congressclient \
        python-designateclient \
        python-heatclient \
        python-ironicclient \
        python-magnumclient \
        python-manilaclient \
        python-mistralclient \
        python-muranoclient \
        python-saharaclient \
        python-swiftclient \
        python-troveclient \
        python-tuskarclient \
        python-zaqarclient \
        python-openstackclient \
        MySQL-python \
        python-memcached
ENV PATH /var/lib/kolla/venv/bin:$PATH

{% endif %}