diff --git a/docker/influxdb/Dockerfile.j2 b/docker/influxdb/Dockerfile.j2 new file mode 100644 index 0000000000..1550306eaf --- /dev/null +++ b/docker/influxdb/Dockerfile.j2 @@ -0,0 +1,17 @@ +FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }} +MAINTAINER {{ maintainer }} +{% import "macros.j2" as macros with context %} + +{% set influxdb_packages = ['influxdb'] %} +RUN {{ macros.install_packages(influxdb_packages | customizable("packages")) }} + +COPY influxdb_sudoers /etc/sudoers.d/kolla_influxdb_sudoers +RUN chmod 750 /etc/sudoers.d \ + && chmod 440 /etc/sudoers.d/kolla_influxdb_sudoers \ + && usermod -a -G kolla influxdb + +{% block influxdb_footer %}{% endblock %} +{% block footer %}{% endblock %} +{{ include_footer }} + +USER influxdb diff --git a/docker/influxdb/influxdb_sudoers b/docker/influxdb/influxdb_sudoers new file mode 100644 index 0000000000..a9757b264e --- /dev/null +++ b/docker/influxdb/influxdb_sudoers @@ -0,0 +1 @@ +%kolla ALL=(root) NOPASSWD: /usr/bin/chown -R influxdb\: /var/lib/influxdb, /bin/chown -R influxdb\: /var/lib/influxdb