73a356e951
Change-Id: I3d8ddf5b54d79d66fd74ed85e9cc65b0ce7201c0 Partially-Implements: blueprint install-from-ubuntu
30 lines
880 B
Django/Jinja
30 lines
880 B
Django/Jinja
FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }}
|
|
MAINTAINER Kolla Project (https://launchpad.net/kolla)
|
|
|
|
{% if install_type == 'binary' %}
|
|
|
|
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
|
|
&& /bin/false
|
|
|
|
{% elif install_type == 'source' %}
|
|
{% if base_distro in ['ubuntu', 'debian'] %}
|
|
|
|
RUN apt-get install -y --no-install-recommends libpq-dev \
|
|
&& apt-get clean
|
|
|
|
{% endif %}
|
|
|
|
ADD ./gnocchi.tar /
|
|
RUN ln -s /gnocchi-* /gnocchi
|
|
|
|
RUN cd /gnocchi \
|
|
&& useradd --user-group gnocchi \
|
|
&& pip install -r requirements.txt \
|
|
&& pip install --install-option="--install-scripts=/usr/bin" /gnocchi \
|
|
&& mkdir -p /etc/gnocchi /var/log/gnocchi /home/gnocchi \
|
|
&& cp -r /gnocchi/etc/* /etc/gnocchi/ \
|
|
&& chown -R gnocchi: /etc/gnocchi /var/log/gnocchi /home/gnocchi \
|
|
&& rm -rf /root/.cache
|
|
|
|
{% endif %}
|