This commit is contained in:
11
Dockerfile
11
Dockerfile
@@ -23,6 +23,16 @@ RUN ["bash", "-exo", "pipefail", "-c", "\
|
|||||||
apt clean all ; \
|
apt clean all ; \
|
||||||
rm -vrf /var/lib/apt/lists/* "]
|
rm -vrf /var/lib/apt/lists/* "]
|
||||||
|
|
||||||
|
## install easysnmp
|
||||||
|
# need for full-features (add maybe if need): libsnmp-dev snmp-mibs-downloader
|
||||||
|
ARG SOURCELIST_FILE="/etc/apt/sources.list.d/debian.sources"
|
||||||
|
RUN ["bash", "-exo", "pipefail", "-c", "\
|
||||||
|
sed -i 's|main|main non-free|g' $SOURCELIST_FILE ; \
|
||||||
|
apt update ; \
|
||||||
|
apt-get install -y python3-easysnmp ; \
|
||||||
|
apt clean all ; \
|
||||||
|
rm -vrf /var/lib/apt/lists/* "]
|
||||||
|
|
||||||
## create persistend data store
|
## create persistend data store
|
||||||
RUN ["bash", "-exo", "pipefail", "-c", "\
|
RUN ["bash", "-exo", "pipefail", "-c", "\
|
||||||
mkdir -p /data ; \
|
mkdir -p /data ; \
|
||||||
@@ -36,6 +46,7 @@ RUN ["bash", "-exo", "pipefail", "-c", "\
|
|||||||
ln -vs /data/var/icinga2 /var/lib/icinga2 ; \
|
ln -vs /data/var/icinga2 /var/lib/icinga2 ; \
|
||||||
ln -vs /data/plugins /usr/lib/nagios/plugins "]
|
ln -vs /data/plugins /usr/lib/nagios/plugins "]
|
||||||
|
|
||||||
|
## basic aliases
|
||||||
RUN ["bash", "-exo", "pipefail", "-c", "\
|
RUN ["bash", "-exo", "pipefail", "-c", "\
|
||||||
echo alias icinga2reload=\"'/usr/lib/icinga2/safe-reload /etc/default/icinga2'\" >> /root/.bashrc ; \
|
echo alias icinga2reload=\"'/usr/lib/icinga2/safe-reload /etc/default/icinga2'\" >> /root/.bashrc ; \
|
||||||
echo alias icinga2checkconfig=\"'icinga2 daemon -C -X'\" >> /root/.bashrc "]
|
echo alias icinga2checkconfig=\"'icinga2 daemon -C -X'\" >> /root/.bashrc "]
|
||||||
|
|||||||
Reference in New Issue
Block a user