aboutsummaryrefslogtreecommitdiff
path: root/docker/gnocchi/gnocchi-base/Dockerfile.j2
blob: be884007353d5b322d8b4c09beb0b856af8b59e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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 \
    && useradd --user-group gnocchi \
    && pip --no-cache-dir install /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

{% endif %}