From 2b56d0405412e1760d4b8c36cf9f54967bc58528 Mon Sep 17 00:00:00 2001 From: anima Date: Fri, 7 Feb 2025 00:52:53 +0100 Subject: [PATCH] add snmp python lib --- Dockerfile | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Dockerfile b/Dockerfile index 973ecf0..2c31209 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,6 +23,16 @@ RUN ["bash", "-exo", "pipefail", "-c", "\ apt clean all ; \ 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 RUN ["bash", "-exo", "pipefail", "-c", "\ mkdir -p /data ; \ @@ -36,6 +46,7 @@ RUN ["bash", "-exo", "pipefail", "-c", "\ ln -vs /data/var/icinga2 /var/lib/icinga2 ; \ ln -vs /data/plugins /usr/lib/nagios/plugins "] +## basic aliases RUN ["bash", "-exo", "pipefail", "-c", "\ echo alias icinga2reload=\"'/usr/lib/icinga2/safe-reload /etc/default/icinga2'\" >> /root/.bashrc ; \ echo alias icinga2checkconfig=\"'icinga2 daemon -C -X'\" >> /root/.bashrc "]