2016-07-25 08:51:58 +00:00
|
|
|
FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }}
|
2017-05-02 07:23:09 +00:00
|
|
|
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
|
2016-07-25 08:51:58 +00:00
|
|
|
|
|
|
|
{% block grafana_header %}{% endblock %}
|
|
|
|
|
|
|
|
{% import "macros.j2" as macros with context %}
|
|
|
|
|
2017-04-19 09:15:19 +00:00
|
|
|
{% if base_arch != 'x86_64' %}
|
|
|
|
|
|
|
|
RUN echo 'There are no Grafana external repositories for {{ base_arch }}' \
|
|
|
|
&& /bin/false
|
|
|
|
|
|
|
|
{% endif %}
|
|
|
|
|
2016-12-18 19:11:47 +00:00
|
|
|
{{ macros.configure_user(name='grafana', homedir='/usr/share/grafana') }}
|
|
|
|
|
2016-07-25 08:51:58 +00:00
|
|
|
{% set grafana_packages = ['grafana'] %}
|
|
|
|
{{ macros.install_packages(grafana_packages | customizable("packages")) }}
|
|
|
|
|
|
|
|
WORKDIR /usr/share/grafana
|
|
|
|
|
|
|
|
COPY grafana_sudoers /etc/sudoers.d/kolla_grafana_sudoers
|
|
|
|
COPY extend_start.sh /usr/local/bin/kolla_extend_start
|
|
|
|
|
2016-11-04 06:01:46 +00:00
|
|
|
RUN grafana-cli plugins install sileht-gnocchi-datasource \
|
2017-03-16 16:37:15 +00:00
|
|
|
&& grafana-cli plugins install grafana-influxdb-08-datasource \
|
2016-11-04 06:01:46 +00:00
|
|
|
&& chmod 750 /etc/sudoers.d \
|
|
|
|
&& chmod 440 /etc/sudoers.d/kolla_grafana_sudoers \
|
2016-12-18 19:11:47 +00:00
|
|
|
&& chmod 755 /usr/local/bin/kolla_extend_start
|
2016-11-04 06:01:46 +00:00
|
|
|
|
2016-07-25 08:51:58 +00:00
|
|
|
{% block grafana_footer %}{% endblock %}
|
|
|
|
{% block footer %}{% endblock %}
|
|
|
|
|
|
|
|
USER grafana
|