From 91155abc90fa8d4eecb557e0490a42f9c2129c3c Mon Sep 17 00:00:00 2001 From: Marc Fournier Date: Wed, 12 Oct 2016 07:14:20 +0200 Subject: [PATCH] contrib/docker: add basic Dockerfile & config files --- contrib/docker/50docker-apt-conf | 4 ++++ contrib/docker/Dockerfile | 24 ++++++++++++++++++++++++ contrib/docker/collectd.conf | 16 ++++++++++++++++ 3 files changed, 44 insertions(+) create mode 100644 contrib/docker/50docker-apt-conf create mode 100644 contrib/docker/Dockerfile create mode 100644 contrib/docker/collectd.conf diff --git a/contrib/docker/50docker-apt-conf b/contrib/docker/50docker-apt-conf new file mode 100644 index 00000000..3f898b3b --- /dev/null +++ b/contrib/docker/50docker-apt-conf @@ -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 new file mode 100644 index 00000000..ff0a0d59 --- /dev/null +++ b/contrib/docker/Dockerfile @@ -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 new file mode 100644 index 00000000..bbcd0791 --- /dev/null +++ b/contrib/docker/collectd.conf @@ -0,0 +1,16 @@ +LoadPlugin logfile + + LogLevel "info" + File STDOUT + Timestamp true + PrintSeverity true + + +LoadPlugin unixsock + + SocketGroup "nogroup" + + + + Filter "*.conf" + -- 2.11.0