5dd79bbbef
Ansible installs pytz from pip which is newer then then pytz in RDO repositories. As part of this process, it removes pytz which corrupts the python installation in some way. This causes further pip usage to produce a backtrace causing the kolla-toolbox container not to build. Mixing pip and RPM is not good. Change-Id: I413468641bad5476cfcba61cb0e2189c31f3d682 Closes-Bug: #1545215
64 lines
1.7 KiB
Django/Jinja
64 lines
1.7 KiB
Django/Jinja
FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }}
|
|
MAINTAINER {{ maintainer }}
|
|
|
|
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
|
|
|
|
# TODO(mandre) remove MariaDB-shared once Percona has fixed its packaging issue
|
|
RUN yum -y install \
|
|
gcc \
|
|
git \
|
|
libffi-devel \
|
|
libxml2-devel \
|
|
libxslt-devel \
|
|
mariadb-devel \
|
|
mariadb-libs \
|
|
MariaDB-shared \
|
|
openssl-devel \
|
|
python-devel \
|
|
openssh-clients \
|
|
&& yum clean all \
|
|
&& yum -y remove pytz
|
|
|
|
{% elif base_distro in ['ubuntu', 'debian'] %}
|
|
|
|
RUN apt-get -y --no-install-recommends install \
|
|
build-essential \
|
|
ca-certificates \
|
|
git \
|
|
libffi-dev \
|
|
libmariadbclient-dev \
|
|
libssl-dev \
|
|
libxslt1-dev \
|
|
python-dev \
|
|
&& apt-get clean
|
|
|
|
{% endif %}
|
|
|
|
RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \
|
|
&& python get-pip.py \
|
|
&& rm get-pip.py \
|
|
&& pip --no-cache-dir install --upgrade wheel \
|
|
&& pip --no-cache-dir install \
|
|
MySQL-python \
|
|
os-client-config==1.13.1 \
|
|
pyudev \
|
|
shade==1.3.0
|
|
|
|
RUN git clone --depth 1 -b v2.0.0-0.7.rc2 https://github.com/ansible/ansible.git \
|
|
&& cd ansible \
|
|
&& git submodule update --init --recursive \
|
|
&& pip --no-cache-dir install .
|
|
|
|
RUN mkdir -p /etc/ansible /usr/share/ansible /home/ansible \
|
|
&& echo 'localhost ansible_connection=local' > /etc/ansible/hosts \
|
|
&& useradd --user-group ansible --groups kolla
|
|
|
|
COPY find_disks.py kolla_keystone_service.py kolla_keystone_user.py kolla_sanity.py kolla_zookeeper.py /usr/share/ansible/
|
|
COPY ansible.cfg /home/ansible/.ansible.cfg
|
|
|
|
CMD ["/bin/sleep", "infinity"]
|
|
|
|
{{ include_footer }}
|
|
|
|
USER ansible
|