0a1c94c33f
Change-Id: Ie500f9b8640129e464075e4bebd628cf4a4d7f86 Partially-Implements: blueprint dockerfile-template
33 lines
838 B
Django/Jinja
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
|