added docker files from titpetric repo; #77
Costa Tsaousis (ktsaou) committed
Aug 24, 2016 at 14:15 UTC
16c43aa300c9899726e8c2df5f725e9064693322
2 files changed
+59
Dockerfile
new
+15
@@ -0,0 +1,15 @@
1
+# author : titpetric
2
+# original: https://github.com/titpetric/netdata
3
+
4
+FROM debian:jessie
5
+
6
+ADD docker-build.sh /docker-build.sh
7
+
8
+RUN chmod +x /docker-build.sh && sync && sleep 1 && /docker-build.sh
9
+
10
+WORKDIR /
11
+
12
+ENV NETDATA_PORT 19999
13
+EXPOSE $NETDATA_PORT
14
+
15
+CMD /usr/sbin/netdata -D -s /host -p ${NETDATA_PORT}
docker-build.sh
new
+44
@@ -0,0 +1,44 @@
1
+#!/bin/bash
2
+
3
+# author : titpetric
4
+# original: https://github.com/titpetric/netdata
5
+
6
+set -e
7
+DEBIAN_FRONTEND=noninteractive
8
+
9
+# some mirrors have issues, i skipped httpredir in favor of an eu mirror
10
+
11
+echo "deb http://ftp.nl.debian.org/debian/ jessie main" > /etc/apt/sources.list
12
+echo "deb http://security.debian.org/debian-security jessie/updates main" >> /etc/apt/sources.list
13
+
14
+# install dependencies for build
15
+
16
+apt-get -qq update
17
+apt-get -y install zlib1g-dev uuid-dev libmnl-dev gcc make curl git autoconf autogen automake pkg-config netcat-openbsd jq
18
+apt-get -y install autoconf-archive lm-sensors nodejs python python-mysqldb python-yaml
19
+
20
+# fetch netdata
21
+
22
+git clone https://github.com/firehol/netdata.git /netdata.git --depth=1
23
+cd /netdata.git
24
+
25
+# use the provided installer
26
+
27
+./netdata-installer.sh --dont-wait --dont-start-it
28
+
29
+# remove build dependencies
30
+
31
+cd /
32
+rm -rf /netdata.git
33
+
34
+dpkg -P zlib1g-dev uuid-dev libmnl-dev gcc make git autoconf autogen automake pkg-config
35
+apt-get -y autoremove
36
+apt-get clean
37
+rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
38
+
39
+
40
+# symlink access log and error log to stdout/stderr
41
+
42
+ln -sf /dev/stdout /var/log/netdata/access.log
43
+ln -sf /dev/stdout /var/log/netdata/debug.log
44
+ln -sf /dev/stderr /var/log/netdata/error.log