FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }} MAINTAINER Kolla Project (https://launchpad.net.kolla) {% if install_type == 'binary' %} {% if base_distro in ['centos', 'fedora', 'oraclelinux'] %} RUN yum -y install openstack-swift && yum clean all {% elif base_distro in ['ubuntu', 'debian'] %} RUN echo '{{ install_type}} not yet available for {{ base_distro }}' \ && /bin/false {% endif %} {% elif install_type == 'source' %} ADD ./swift.tar / RUN ln -s /swift-* /swift RUN cd /swift \ && useradd --user-group swift \ && pip install -r requirements.txt \ && pip install /swift \ && mkdir /etc/swift /var/log/swift \ && cp -r /swift/etc/* /etc/swift/ \ && rm -rf /root/.cache {% endif %} COPY config-swift.sh build-swift-ring.py /opt/kolla/ RUN mkdir /opt/swift