Merge "Add effective and permitted capability to blackbox exporter"
This commit is contained in:
commit
1c86301f28
@ -3,15 +3,30 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
|
||||
|
||||
{% block prometheus_blackbox_exporter_header %}{% endblock %}
|
||||
|
||||
{% import "macros.j2" as macros with context %}
|
||||
|
||||
{% block prometheus_blackbox_exporter_repository_version %}
|
||||
ENV blackbox_exporter_version=0.13.0
|
||||
ENV blackbox_exporter_version=0.14.0
|
||||
{% endblock %}
|
||||
|
||||
{% if base_package_type == 'rpm' %}
|
||||
{% set blackbox_packages = [
|
||||
'libcap'
|
||||
] %}
|
||||
{% elif base_package_type == 'deb' %}
|
||||
{% set blackbox_packages = [
|
||||
'libcap2-bin'
|
||||
] %}
|
||||
{% endif %}
|
||||
|
||||
{{ macros.install_packages(blackbox_packages | customizable("packages")) }}
|
||||
|
||||
{% block prometheus_blackbox_exporter_install %}
|
||||
RUN curl -sSL -o /tmp/blackbox_exporter.tar.gz https://github.com/prometheus/blackbox_exporter/releases/download/v${blackbox_exporter_version}/blackbox_exporter-${blackbox_exporter_version}.linux-{{debian_arch}}.tar.gz \
|
||||
&& tar xvf /tmp/blackbox_exporter.tar.gz -C /opt/ \
|
||||
&& rm -f /tmp/blackbox_exporter.tar.gz \
|
||||
&& ln -s /opt/blackbox_exporter* /opt/blackbox_exporter
|
||||
RUN setcap cap_net_raw+ep /opt/blackbox_exporter/blackbox_exporter
|
||||
{% endblock %}
|
||||
|
||||
{% block prometheus_blackbox_exporter_footer %}{% endblock %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user