summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c76419c)
raw | patch | inline | side by side (parent: c76419c)
author | Marc Fournier <marc.fournier@camptocamp.com> | |
Wed, 12 Oct 2016 05:14:20 +0000 (07:14 +0200) | ||
committer | Marc Fournier <marc.fournier@camptocamp.com> | |
Wed, 16 Nov 2016 07:02:05 +0000 (08:02 +0100) |
contrib/docker/50docker-apt-conf | [new file with mode: 0644] | patch | blob |
contrib/docker/Dockerfile | [new file with mode: 0644] | patch | blob |
contrib/docker/collectd.conf | [new file with mode: 0644] | patch | blob |
diff --git a/contrib/docker/50docker-apt-conf b/contrib/docker/50docker-apt-conf
--- /dev/null
@@ -0,0 +1,4 @@
+APT::Install-Recommends "0";
+APT::Install-Suggests "0";
+APT::Get::Assume-Yes "1";
+APT::Get::AutomaticRemove "1";
diff --git a/contrib/docker/Dockerfile b/contrib/docker/Dockerfile
--- /dev/null
@@ -0,0 +1,24 @@
+FROM debian:stable
+
+ENV DEBIAN_FRONTEND noninteractive
+COPY 50docker-apt-conf /etc/apt/apt.conf.d/
+
+COPY rootfs_prefix/ /usr/src/rootfs_prefix/
+
+RUN apt-get update \
+ && apt-get upgrade \
+ && apt-get install \
+ collectd-core \
+ collectd-utils \
+ build-essential \
+ && make -C /usr/src/rootfs_prefix/ \
+ && apt-get --purge remove build-essential \
+ && apt-get clean \
+ && rm -rf /var/lib/apt/lists/*
+
+RUN mkdir /etc/collectd/collectd.conf.d
+COPY collectd.conf /etc/collectd/collectd.conf
+
+ENV LD_PRELOAD /usr/src/rootfs_prefix/rootfs_prefix.so
+
+CMD [ "/usr/sbin/collectd", "-f"]
diff --git a/contrib/docker/collectd.conf b/contrib/docker/collectd.conf
--- /dev/null
@@ -0,0 +1,16 @@
+LoadPlugin logfile
+<Plugin logfile>
+ LogLevel "info"
+ File STDOUT
+ Timestamp true
+ PrintSeverity true
+</Plugin>
+
+LoadPlugin unixsock
+<Plugin unixsock>
+ SocketGroup "nogroup"
+</Plugin>
+
+<Include "/etc/collectd/collectd.conf.d">
+ Filter "*.conf"
+</Include>