Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 12 additions & 68 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,75 +1,19 @@
FROM debian:jessie
MAINTAINER Carles Amigó, fr3nd@fr3nd.net

ENV COLLECTD_VERSION 5.5.0
WORKDIR /usr/src/

RUN apt-get update && apt-get install -y \
autoconf \
automake \
autotools-dev \
bison \
build-essential \
curl \
flex \
git \
iptables-dev \
libcurl4-gnutls-dev \
libdbi0-dev \
libesmtp-dev \
libganglia1-dev \
libgcrypt11-dev \
libglib2.0-dev \
libhiredis-dev \
libltdl-dev \
liblvm2-dev \
libmemcached-dev \
libmnl-dev \
libmodbus-dev \
libmysqlclient-dev \
libopenipmi-dev \
liboping-dev \
libow-dev \
libpcap-dev \
libperl-dev \
libpq-dev \
libprotobuf-c-dev \
librabbitmq-dev \
librrd-dev \
libsensors4-dev \
libsnmp-dev \
libtokyocabinet-dev \
libtokyotyrant-dev \
libtool \
libupsclient-dev \
libvirt-dev \
libxml2-dev \
libyajl-dev \
linux-libc-dev \
pkg-config \
protobuf-c-compiler \
python-dev && \
rm -rf /usr/share/doc/* && \
rm -rf /usr/share/info/* && \
rm -rf /tmp/* && \
rm -rf /var/tmp/*

ENV COLLECTD_VERSION collectd-5.5.0

WORKDIR /usr/src
RUN git clone https://github.com/collectd/collectd.git
WORKDIR /usr/src/collectd
RUN git checkout $COLLECTD_VERSION
RUN ./build.sh
RUN ./configure \
--prefix=/usr \
--sysconfdir=/etc/collectd \
--without-libstatgrab \
--without-included-ltdl \
--disable-static
RUN make all
RUN make install
RUN make clean
ADD collectd.conf /etc/collectd/
ADD entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh

RUN echo 'ef97838e249814ad96a2edc0410326efbb4f3d08 collectd-5.5.0.tar.bz2' > /tmp/collectd.sig && \
apt-get update && apt-get install -y build-essential wget tar lbzip2 && \
wget https://collectd.org/files/collectd-$COLLECTD_VERSION.tar.bz2 && \
shasum -a 1 -c /tmp/collectd.sig && \
tar xf collectd-$COLLECTD_VERSION.tar.bz2 && \
cd collectd-$COLLECTD_VERSION && \
./configure && make && make install && cd - \
rm -rf /usr/src/collectd /usr/src/collectd-$COLLECTD_VERSION* /var/lib/apt/lists/* && \
apt-get autoremove -y build-essential

ENTRYPOINT ["/entrypoint.sh"]
2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ if [ -d /mnt/proc ]; then
fi

if [ -z "$@" ]; then
exec /usr/sbin/collectd -C /etc/collectd/collectd.conf -f
exec /opt/collectd/sbin/collectd -C /etc/collectd/collectd.conf -f
else
exec $@
fi