netdata-docker/scripts/build.sh

42 lines
1.3 KiB
Bash
Raw Permalink Normal View History

2020-02-05 09:35:11 +00:00
#!/bin/bash
set -e
DEBIAN_FRONTEND=noninteractive
2020-02-05 09:48:15 +00:00
# belt and suspenders
export DO_NOT_TRACK=1
2020-02-05 09:35:11 +00:00
# install dependencies for build
apt-get -qq update
2020-02-05 09:48:15 +00:00
apt-get -y install zlib1g-dev uuid-dev libmnl-dev gcc make curl git autoconf autogen automake pkg-config netcat-openbsd jq libuv1-dev liblz4-dev libjudy-dev libssl-dev
apt-get -y install autoconf-archive lm-sensors nodejs python python-mysqldb python-yaml libjudydebian1 libuv1 liblz4-1 openssl
apt-get -y install msmtp msmtp-mta apcupsd fping
2020-02-05 09:35:11 +00:00
# fetch netdata
git clone https://github.com/netdata/netdata.git /netdata.git
cd /netdata.git
2020-02-05 09:48:15 +00:00
# v1.19.0 release:
2020-02-05 09:40:28 +00:00
git checkout 5000257f0171271cb3ee2cf0fe02e8a2154ddf2e
2020-02-05 09:35:11 +00:00
# use the provided installer
./netdata-installer.sh --dont-wait --dont-start-it --disable-telemetry
touch /etc/netdata/.opt-out-from-anonymous-statistics
# remove build dependencies
cd /
rm -rf /netdata.git
2020-02-05 09:48:15 +00:00
dpkg -P zlib1g-dev uuid-dev libmnl-dev gcc make git autoconf autogen automake pkg-config libuv1-dev liblz4-dev libjudy-dev libssl-dev
2020-02-05 09:35:11 +00:00
apt-get -y autoremove
apt-get clean
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# symlink access log and error log to stdout/stderr
ln -sf /dev/stdout /var/log/netdata/access.log
ln -sf /dev/stdout /var/log/netdata/debug.log
ln -sf /dev/stderr /var/log/netdata/error.log