kolla-ansible/docker_templates/swift/swift-base/Dockerfile.j2
akwasniewska 0a1c94c33f Add Dockerfile template for swift
Change-Id: Ie500f9b8640129e464075e4bebd628cf4a4d7f86
Partially-Implements: blueprint dockerfile-template
2015-08-17 06:13:15 +02:00

33 lines
838 B
Django/Jinja

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