kolla-ansible/docker/openstack-base/Dockerfile.j2
Jeffrey Zhang 14dfbc13a2 Pin the pip version to 7.1.2
latest pip 8.0 can not override the system installed package

Closes-Bug: #1536023
Change-Id: Ida07fc9e2e8aaffb3caaffce75ec4cbf8a4994e8
2016-01-20 20:43:06 +08:00

147 lines
4.3 KiB
Django/Jinja

FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }}
MAINTAINER {{ maintainer }}
{% if base_distro in ['fedora', 'centos', 'oraclelinux', 'rhel'] %}
RUN yum -y install \
git \
iproute \
mariadb-libs \
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-PyMySQL \
python-pip \
python-saharaclient \
python-swiftclient \
python-troveclient \
python-tuskarclient \
python-zaqarclient \
python-openstackclient \
python-keystoneauth1 \
&& yum clean all
{% elif base_distro in ['ubuntu'] %}
# This will prevent questions from being asked during the install
ENV DEBIAN_FRONTEND noninteractive
COPY oslo-log-bug1499620.patch /var/lib/kolla/oslo-log-bug1499620.patch
# There is no python-tuskarclient in ubuntu 14.04
RUN apt-get install -y --no-install-recommends \
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-zaqarclient \
python-openstackclient \
python-pymysql \
python-keystoneclient \
python-oslo.log \
openssl \
patch \
&& apt-get clean
# python-oslo-log patch to bug 1499620 (it fixed in python-oslo-log 1.11.1)
RUN patch -d /usr/lib/python2.7/site-packages -p1 < /var/lib/kolla/oslo-log-bug1499620.patch
{% 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
# TODO(jeffrey4l): Pin the pip to the 7.1.2. version. latest pip
# (now 8.0) can not install the package when conflict with the
# system. The best solution should use the virtualenv for
# isolation or following bug is fixed:
# https://github.com/pypa/pip/pull/3389
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 pip==7.1.2 \
&& pip --no-cache-dir install -U virtualenv \
&& virtualenv --system-site-packages /var/lib/kolla/venv \
&& /var/lib/kolla/venv/bin/pip --no-cache-dir install pip==7.1.2 \
&& /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt \
jinja2 \
kazoo \
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 \
pymysql \
python-memcached \
six
ENV PATH /var/lib/kolla/venv/bin:$PATH
{% endif %}