kolla-ansible/docker/kolla-ansible/Dockerfile.j2

58 lines
1.5 KiB
Django/Jinja

FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }}
MAINTAINER {{ maintainer }}
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
RUN yum -y install \
gcc \
git \
libffi-devel \
libxml2-devel \
libxslt-devel \
mariadb-devel \
mariadb-libs \
openssl-devel \
python-devel \
openssh-clients \
&& yum clean all
{% 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 install -U wheel \
&& pip --no-cache-dir install \
MySQL-python \
shade \
pyudev
RUN git clone --depth 1 -b v2.0.0-0.2.alpha2 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
{{ include_footer }}
USER ansible