From baf71d978f80ff24ffc6e91c292f02601c3ad3d1 Mon Sep 17 00:00:00 2001 From: Chris Yocum Date: Mon, 10 Jun 2024 16:11:28 -0400 Subject: [PATCH] Another attemt at getting the Additional Plugins working with Ubuntu 24 --- Dockerfile.linux-amd64 | 19 +++++++++++++------ Dockerfile.linux-arm-v7 | 20 +++++++++++++------- Dockerfile.linux-arm64 | 19 +++++++++++++------ 3 files changed, 39 insertions(+), 19 deletions(-) diff --git a/Dockerfile.linux-amd64 b/Dockerfile.linux-amd64 index 8892946..a6ffc6c 100644 --- a/Dockerfile.linux-amd64 +++ b/Dockerfile.linux-amd64 @@ -82,7 +82,8 @@ RUN echo postfix postfix/main_mailer_type string "'Internet Site'" | debconf-set libgd-gd2-perl \ libjson-perl \ libldap2-dev \ - libmysqlclient-dev \ + #libmysqlclient-dev \ + libmariadb-dev \ libnagios-object-perl \ libmonitoring-plugin-perl \ libnet-snmp-perl \ @@ -106,8 +107,9 @@ RUN echo postfix postfix/main_mailer_type string "'Internet Site'" | debconf-set postfix \ #python2 \ python3-full \ - python3-pip \ python3-nagiosplugin \ + python3-pip \ + python3-venv \ rsync \ rsyslog \ runit \ @@ -227,9 +229,14 @@ RUN cd /opt && \ #python2 get-pip.py && \ #python3 get-pip.py && \ #pip install --no-cache-dir "pymssql<2.2.0" && \ - pip3 install --break-system-packages --no-cache-dir pymssql && \ - pip3 install --break-system-packages --no-cache-dir --find-links https://wheel-index.linuxserver.io/ubuntu/ pywbem paramiko pplogger paho-mqtt && \ - pip3 install --break-system-packages --no-cache-dir --find-links https://wheel-index.linuxserver.io/ubuntu/ --upgrade requests && \ + python3 -m venv .venv && \ + . .venv/bin/activate && \ + #pip3 install --break-system-packages --no-cache-dir pymssql && \ + pip3 install --no-cache-dir pymssql && \ + #pip3 install --break-system-packages --no-cache-dir --find-links https://wheel-index.linuxserver.io/ubuntu/ pywbem paramiko pplogger paho-mqtt && \ + pip3 install --no-cache-dir --find-links https://wheel-index.linuxserver.io/ubuntu/ pywbem paramiko pplogger paho-mqtt && \ + #pip3 install --break-system-packages --no-cache-dir --find-links https://wheel-index.linuxserver.io/ubuntu/ --upgrade requests && \ + pip3 install --no-cache-dir --find-links https://wheel-index.linuxserver.io/ubuntu/ --upgrade requests && \ git clone https://github.com/willixix/naglio-plugins.git WL-Nagios-Plugins && \ git clone https://github.com/JasonRivers/nagios-plugins.git JR-Nagios-Plugins && \ git clone https://github.com/justintime/nagios-plugins.git JE-Nagios-Plugins && \ @@ -321,7 +328,7 @@ RUN cd /opt/nagiosgraph/etc && \ sh fix-nagiosgraph-multiple-selection.sh # Enable all runit services -RUN ln -s /etc/sv/* /etc/service +RUN ln -sf /etc/sv/* /etc/service # Fix ping permissions for Nagios user RUN chmod u+s /usr/bin/ping diff --git a/Dockerfile.linux-arm-v7 b/Dockerfile.linux-arm-v7 index 4ffd794..13f6999 100644 --- a/Dockerfile.linux-arm-v7 +++ b/Dockerfile.linux-arm-v7 @@ -82,7 +82,8 @@ RUN echo postfix postfix/main_mailer_type string "'Internet Site'" | debconf-set libgd-gd2-perl \ libjson-perl \ libldap2-dev \ - libmysqlclient-dev \ + #libmysqlclient-dev \ + libmariadb-dev \ libnagios-object-perl \ libmonitoring-plugin-perl \ libnet-snmp-perl \ @@ -106,8 +107,9 @@ RUN echo postfix postfix/main_mailer_type string "'Internet Site'" | debconf-set postfix \ #python2 \ python3-full \ - python3-pip \ python3-nagiosplugin \ + python3-pip \ + python3-venv \ rsync \ rsyslog \ runit \ @@ -238,10 +240,14 @@ RUN cd /opt && \ #echo "Cython==0.29.35" >> constraints.txt && \ #export PIP_CONSTRAINT="$(pwd)/constraints.txt" && \ #pip install --no-cache-dir "pymssql<2.2.0" && \ - pip3 install --break-system-packages --no-cache-dir pymssql && \ - #python3 -m pip install --upgrade pip && \ - pip3 install --break-system-packages --no-cache-dir --find-links https://wheel-index.linuxserver.io/ubuntu/ pywbem paramiko pplogger paho-mqtt bcrypt && \ - pip3 install --break-system-packages --no-cache-dir --find-links https://wheel-index.linuxserver.io/ubuntu/ --upgrade requests && \ + python3 -m venv .venv && \ + . .venv/bin/activate && \ + #pip3 install --break-system-packages --no-cache-dir pymssql && \ + pip3 install --no-cache-dir pymssql && \ + #pip3 install --break-system-packages --no-cache-dir --find-links https://wheel-index.linuxserver.io/ubuntu/ pywbem paramiko pplogger paho-mqtt && \ + pip3 install --no-cache-dir --find-links https://wheel-index.linuxserver.io/ubuntu/ pywbem paramiko pplogger paho-mqtt && \ + #pip3 install --break-system-packages --no-cache-dir --find-links https://wheel-index.linuxserver.io/ubuntu/ --upgrade requests && \ + pip3 install --no-cache-dir --find-links https://wheel-index.linuxserver.io/ubuntu/ --upgrade requests && \ git clone https://github.com/willixix/naglio-plugins.git WL-Nagios-Plugins && \ git clone https://github.com/JasonRivers/nagios-plugins.git JR-Nagios-Plugins && \ git clone https://github.com/justintime/nagios-plugins.git JE-Nagios-Plugins && \ @@ -333,7 +339,7 @@ RUN cd /opt/nagiosgraph/etc && \ sh fix-nagiosgraph-multiple-selection.sh # Enable all runit services -RUN ln -s /etc/sv/* /etc/service +RUN ln -sf /etc/sv/* /etc/service # Fix ping permissions for Nagios user RUN chmod u+s /usr/bin/ping diff --git a/Dockerfile.linux-arm64 b/Dockerfile.linux-arm64 index 6c72916..6584ee1 100644 --- a/Dockerfile.linux-arm64 +++ b/Dockerfile.linux-arm64 @@ -82,7 +82,8 @@ RUN echo postfix postfix/main_mailer_type string "'Internet Site'" | debconf-set libgd-gd2-perl \ libjson-perl \ libldap2-dev \ - libmysqlclient-dev \ + #libmysqlclient-dev \ + libmariadb-dev \ libnagios-object-perl \ libmonitoring-plugin-perl \ libnet-snmp-perl \ @@ -106,8 +107,9 @@ RUN echo postfix postfix/main_mailer_type string "'Internet Site'" | debconf-set postfix \ #python2 \ python3-full \ - python3-pip \ python3-nagiosplugin \ + python3-pip \ + python3-venv \ rsync \ rsyslog \ runit \ @@ -233,9 +235,14 @@ RUN cd /opt && \ #echo "Cython==0.29.35" >> constraints.txt && \ #export PIP_CONSTRAINT="$(pwd)/constraints.txt" && \ #pip install --no-cache-dir "pymssql<2.2.0" && \ - pip3 install --break-system-packages --no-cache-dir pymssql && \ - pip3 install --break-system-packages --no-cache-dir --find-links https://wheel-index.linuxserver.io/ubuntu/ pywbem paramiko pplogger paho-mqtt && \ - pip3 install --break-system-packages --no-cache-dir --find-links https://wheel-index.linuxserver.io/ubuntu/ --upgrade requests && \ + python3 -m venv .venv && \ + . .venv/bin/activate && \ + #pip3 install --break-system-packages --no-cache-dir pymssql && \ + pip3 install --no-cache-dir pymssql && \ + #pip3 install --break-system-packages --no-cache-dir --find-links https://wheel-index.linuxserver.io/ubuntu/ pywbem paramiko pplogger paho-mqtt && \ + pip3 install --no-cache-dir --find-links https://wheel-index.linuxserver.io/ubuntu/ pywbem paramiko pplogger paho-mqtt && \ + #pip3 install --break-system-packages --no-cache-dir --find-links https://wheel-index.linuxserver.io/ubuntu/ --upgrade requests && \ + pip3 install --no-cache-dir --find-links https://wheel-index.linuxserver.io/ubuntu/ --upgrade requests && \ git clone https://github.com/willixix/naglio-plugins.git WL-Nagios-Plugins && \ git clone https://github.com/JasonRivers/nagios-plugins.git JR-Nagios-Plugins && \ git clone https://github.com/justintime/nagios-plugins.git JE-Nagios-Plugins && \ @@ -327,7 +334,7 @@ RUN cd /opt/nagiosgraph/etc && \ sh fix-nagiosgraph-multiple-selection.sh # Enable all runit services -RUN ln -s /etc/sv/* /etc/service +RUN ln -sf /etc/sv/* /etc/service # Fix ping permissions for Nagios user RUN chmod u+s /usr/bin/ping