From a85c199666ec4cb51d3af8a857b31e9c8aacc1af Mon Sep 17 00:00:00 2001 From: Dario Eltzner Date: Wed, 26 Apr 2023 10:26:02 +0200 Subject: [PATCH 01/55] Upgrade Nagios Core to 4.4.11 and Nagios Plugins to 2.4.4 --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index a8dc0ff..28ab0a1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,8 +18,8 @@ ENV NAGIOS_HOME=/opt/nagios \ NAGIOS_FQDN=nagios.example.com \ NAGIOSADMIN_USER=nagiosadmin \ NAGIOSADMIN_PASS=nagios \ - NAGIOS_VERSION=4.4.10 \ - NAGIOS_PLUGINS_VERSION=2.4.3 \ + NAGIOS_VERSION=4.4.11 \ + NAGIOS_PLUGINS_VERSION=2.4.4 \ NRPE_VERSION=4.1.0 \ APACHE_LOCK_DIR=/var/run \ APACHE_LOG_DIR=/var/log/apache2 From 0ae44023641b2fef5f0a793672ef16f1b5bc43d5 Mon Sep 17 00:00:00 2001 From: Christos Manios Date: Wed, 10 May 2023 09:00:25 +0300 Subject: [PATCH 02/55] Release build 13. --- CHANGELOG.md | 10 ++++++++++ Dockerfile | 2 +- README.md | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 94ed10b..9e68ee4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,16 @@ This Docker image contains more than one software (Nagios, Nagios plugins, NRPE, Apache HTTPD, etc.) with different versions. Hence we decided to name the releases with the naming `Build - ` which will have an incremental unsigned integer. In this document we will describe the contents of every image in every build. +## Build 13 (2023-05-10) + +* Nagios core: v4.4.11 +* Nagios plugins: v2.4.4 +* NRPE: 4.1.0 + +### Features + +* Upgrade to Nagios Core to `4.4.11`, Nagios plugins to `2.4.4``. ([#58](https://github.com/manios/docker-nagios/issues/58) + ## Build 12 (2023-03-03) * Nagios core: v4.4.10 diff --git a/Dockerfile b/Dockerfile index 28ab0a1..5b247a1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -203,7 +203,7 @@ LABEL name="Nagios" \ nrpeVersion=$NRPE_VERSION \ homepage="https://www.nagios.com/" \ maintainer="Christos Manios " \ - build="12" + build="13" RUN mkdir -p ${NAGIOS_HOME} && \ mkdir -p /orig/apache2 diff --git a/README.md b/README.md index 9526f15..6223540 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Build Status: ## Supported tags and respective `Dockerfile` links -* `4.4.10`, `4.4`, `latest` [(4.4.10/Dockerfile)](https://github.com/manios/docker-nagios/blob/master/Dockerfile) +* `4.4.11`, `4.4`, `latest` [(4.4.11/Dockerfile)](https://github.com/manios/docker-nagios/blob/master/Dockerfile) For more information about the image versions you may refer to the [CHANGELOG](https://github.com/manios/docker-nagios/blob/master/CHANGELOG.md) From ca16cc0c975a30028cf687f1b5e4a473b308789f Mon Sep 17 00:00:00 2001 From: Christos Manios Date: Wed, 31 May 2023 09:21:30 +0300 Subject: [PATCH 03/55] Upgrade Nagios Core to 4.4.12 (#60) Release build 14. --- CHANGELOG.md | 14 ++++++++++++-- Dockerfile | 4 ++-- README.md | 2 +- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e68ee4..eb36598 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,16 @@ This Docker image contains more than one software (Nagios, Nagios plugins, NRPE, Apache HTTPD, etc.) with different versions. Hence we decided to name the releases with the naming `Build - ` which will have an incremental unsigned integer. In this document we will describe the contents of every image in every build. +## Build 14 (2023-06-01) + +* Nagios core: v4.4.12 +* Nagios plugins: v2.4.4 +* NRPE: 4.1.0 + +### Features + +* Upgrade to Nagios Core to `4.4.12`. ([#60](https://github.com/manios/docker-nagios/issues/60)) + ## Build 13 (2023-05-10) * Nagios core: v4.4.11 @@ -11,7 +21,7 @@ This Docker image contains more than one software (Nagios, Nagios plugins, NRPE, ### Features -* Upgrade to Nagios Core to `4.4.11`, Nagios plugins to `2.4.4``. ([#58](https://github.com/manios/docker-nagios/issues/58) +* Upgrade to Nagios Core to `4.4.11`, Nagios plugins to `2.4.4`. ([#58](https://github.com/manios/docker-nagios/issues/58)) ## Build 12 (2023-03-03) @@ -21,7 +31,7 @@ This Docker image contains more than one software (Nagios, Nagios plugins, NRPE, ### Features -* Upgrade to Nagios Core to `4.4.10`, Nagios plugins to `2.4.3``. ([#53](https://github.com/manios/docker-nagios/issues/53) +* Upgrade to Nagios Core to `4.4.10`, Nagios plugins to `2.4.3`. ([#53](https://github.com/manios/docker-nagios/issues/53)) ## Build 11 (2022-12-12) diff --git a/Dockerfile b/Dockerfile index 5b247a1..247cceb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,7 +18,7 @@ ENV NAGIOS_HOME=/opt/nagios \ NAGIOS_FQDN=nagios.example.com \ NAGIOSADMIN_USER=nagiosadmin \ NAGIOSADMIN_PASS=nagios \ - NAGIOS_VERSION=4.4.11 \ + NAGIOS_VERSION=4.4.12 \ NAGIOS_PLUGINS_VERSION=2.4.4 \ NRPE_VERSION=4.1.0 \ APACHE_LOCK_DIR=/var/run \ @@ -203,7 +203,7 @@ LABEL name="Nagios" \ nrpeVersion=$NRPE_VERSION \ homepage="https://www.nagios.com/" \ maintainer="Christos Manios " \ - build="13" + build="14" RUN mkdir -p ${NAGIOS_HOME} && \ mkdir -p /orig/apache2 diff --git a/README.md b/README.md index 6223540..b5a4906 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Build Status: ## Supported tags and respective `Dockerfile` links -* `4.4.11`, `4.4`, `latest` [(4.4.11/Dockerfile)](https://github.com/manios/docker-nagios/blob/master/Dockerfile) +* `4.4.12`, `4.4`, `latest` [(4.4.12/Dockerfile)](https://github.com/manios/docker-nagios/blob/master/Dockerfile) For more information about the image versions you may refer to the [CHANGELOG](https://github.com/manios/docker-nagios/blob/master/CHANGELOG.md) From edaddfe36d920a0d903baf9919a01aeb47df0d66 Mon Sep 17 00:00:00 2001 From: Christos Manios Date: Mon, 12 Jun 2023 09:07:22 +0300 Subject: [PATCH 04/55] Upgrade Nagios Core to 4.4.13 and Nagios Plugins to 2.4.5 (#61) --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 247cceb..4a90bbb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,8 +18,8 @@ ENV NAGIOS_HOME=/opt/nagios \ NAGIOS_FQDN=nagios.example.com \ NAGIOSADMIN_USER=nagiosadmin \ NAGIOSADMIN_PASS=nagios \ - NAGIOS_VERSION=4.4.12 \ - NAGIOS_PLUGINS_VERSION=2.4.4 \ + NAGIOS_VERSION=4.4.13 \ + NAGIOS_PLUGINS_VERSION=2.4.5 \ NRPE_VERSION=4.1.0 \ APACHE_LOCK_DIR=/var/run \ APACHE_LOG_DIR=/var/log/apache2 @@ -203,7 +203,7 @@ LABEL name="Nagios" \ nrpeVersion=$NRPE_VERSION \ homepage="https://www.nagios.com/" \ maintainer="Christos Manios " \ - build="14" + build="15" RUN mkdir -p ${NAGIOS_HOME} && \ mkdir -p /orig/apache2 From 909d1092f0d10c596ff865663dc7f4e065daf059 Mon Sep 17 00:00:00 2001 From: Christos Manios Date: Mon, 12 Jun 2023 09:07:50 +0300 Subject: [PATCH 05/55] Release build 15. --- CHANGELOG.md | 10 ++++++++++ README.md | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eb36598..2aecd22 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,16 @@ This Docker image contains more than one software (Nagios, Nagios plugins, NRPE, Apache HTTPD, etc.) with different versions. Hence we decided to name the releases with the naming `Build - ` which will have an incremental unsigned integer. In this document we will describe the contents of every image in every build. +## Build 15 (2023-06-12) + +* Nagios core: v4.4.13 +* Nagios plugins: v2.4.5 +* NRPE: 4.1.0 + +### Features + +* Upgrade to Nagios Core to `4.4.13`, Nagios plugins to `2.4.5`. ([#61](https://github.com/manios/docker-nagios/issues/61)) + ## Build 14 (2023-06-01) * Nagios core: v4.4.12 diff --git a/README.md b/README.md index b5a4906..94ad1e2 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Build Status: ## Supported tags and respective `Dockerfile` links -* `4.4.12`, `4.4`, `latest` [(4.4.12/Dockerfile)](https://github.com/manios/docker-nagios/blob/master/Dockerfile) +* `4.4.13`, `4.4`, `latest` [(4.4.12/Dockerfile)](https://github.com/manios/docker-nagios/blob/master/Dockerfile) For more information about the image versions you may refer to the [CHANGELOG](https://github.com/manios/docker-nagios/blob/master/CHANGELOG.md) From a5276ab07f61c616f1509e705c701f91bf2aaccc Mon Sep 17 00:00:00 2001 From: Christos Manios Date: Mon, 7 Aug 2023 09:21:03 +0300 Subject: [PATCH 06/55] Upgrade Nagios Core to 4.4.14 and Nagios Plugins to 2.4.6 (#63) --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4a90bbb..e34c857 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,8 +18,8 @@ ENV NAGIOS_HOME=/opt/nagios \ NAGIOS_FQDN=nagios.example.com \ NAGIOSADMIN_USER=nagiosadmin \ NAGIOSADMIN_PASS=nagios \ - NAGIOS_VERSION=4.4.13 \ - NAGIOS_PLUGINS_VERSION=2.4.5 \ + NAGIOS_VERSION=4.4.14 \ + NAGIOS_PLUGINS_VERSION=2.4.6 \ NRPE_VERSION=4.1.0 \ APACHE_LOCK_DIR=/var/run \ APACHE_LOG_DIR=/var/log/apache2 @@ -203,7 +203,7 @@ LABEL name="Nagios" \ nrpeVersion=$NRPE_VERSION \ homepage="https://www.nagios.com/" \ maintainer="Christos Manios " \ - build="15" + build="16-snapshot" RUN mkdir -p ${NAGIOS_HOME} && \ mkdir -p /orig/apache2 From 39a727f7da20ec099aa4d4bd73509e8e5c53d1f2 Mon Sep 17 00:00:00 2001 From: Christos Manios Date: Mon, 7 Aug 2023 09:21:27 +0300 Subject: [PATCH 07/55] Release build 16. --- CHANGELOG.md | 6 ++++++ README.md | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2aecd22..cac2410 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,12 @@ This Docker image contains more than one software (Nagios, Nagios plugins, NRPE, Apache HTTPD, etc.) with different versions. Hence we decided to name the releases with the naming `Build - ` which will have an incremental unsigned integer. In this document we will describe the contents of every image in every build. +## Build 16 (2023-08-09) + +* Nagios core: v4.4.14 +* Nagios plugins: v2.4.6 +* NRPE: 4.1.0 + ## Build 15 (2023-06-12) * Nagios core: v4.4.13 diff --git a/README.md b/README.md index 94ad1e2..db7c3ff 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Build Status: ## Supported tags and respective `Dockerfile` links -* `4.4.13`, `4.4`, `latest` [(4.4.12/Dockerfile)](https://github.com/manios/docker-nagios/blob/master/Dockerfile) +* `4.4.14`, `4.4`, `latest` [(4.4.14/Dockerfile)](https://github.com/manios/docker-nagios/blob/master/Dockerfile) For more information about the image versions you may refer to the [CHANGELOG](https://github.com/manios/docker-nagios/blob/master/CHANGELOG.md) From d6e574e7d7e2d16b61b9341a06607d0bf9e5bfa4 Mon Sep 17 00:00:00 2001 From: Christos Manios Date: Mon, 14 Aug 2023 09:26:39 +0300 Subject: [PATCH 08/55] Fix build 16 number and add org.opencontainers labels. --- .github/workflows/github-build.yml | 2 ++ Dockerfile | 11 ++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/github-build.yml b/.github/workflows/github-build.yml index abf2bde..1407c6b 100644 --- a/.github/workflows/github-build.yml +++ b/.github/workflows/github-build.yml @@ -88,6 +88,7 @@ jobs: --cache-to "type=local,dest=/tmp/.buildx-cache" \ --platform linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 \ --label "gitCommit=${{ github.sha }}" \ + --label "org.opencontainers.image.revision=${{ github.sha }}" \ --tag manios/nagios:${{ env.action_mytag }} \ --output "type=image,push=false" . - @@ -100,6 +101,7 @@ jobs: --cache-from "type=local,src=/tmp/.buildx-cache" \ --platform linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 \ --label "gitCommit=${{ github.sha }}" \ + --label "org.opencontainers.image.revision=${{ github.sha }}" \ --tag manios/nagios:${{ env.action_mytag }} \ --output "type=image,push=true" . - diff --git a/Dockerfile b/Dockerfile index e34c857..e628b56 100644 --- a/Dockerfile +++ b/Dockerfile @@ -203,7 +203,16 @@ LABEL name="Nagios" \ nrpeVersion=$NRPE_VERSION \ homepage="https://www.nagios.com/" \ maintainer="Christos Manios " \ - build="16-snapshot" + build="16" \ + org.opencontainers.image.title="Nagios" \ + org.opencontainers.image.description="Nagios, the Industry Standard In IT Infrastructure Monitoring" \ + org.opencontainers.image.vendor="Nagios" \ + org.opencontainers.image.authors="Christos Manios " \ + org.opencontainers.image.licenses="MIT" \ + org.opencontainers.image.url="https://hub.docker.com/r/manios/nagios" \ + org.opencontainers.image.source="https://github.com/manios/docker-nagios" \ + org.opencontainers.image.documentation="https://github.com/manios/docker-nagios/blob/master/README.md" \ + org.opencontainers.image.version="16" RUN mkdir -p ${NAGIOS_HOME} && \ mkdir -p /orig/apache2 From 2ef46386525c4ec9d96c6f9df1812bc95c348865 Mon Sep 17 00:00:00 2001 From: Christos Manios Date: Mon, 14 Aug 2023 09:31:38 +0300 Subject: [PATCH 09/55] Remove space which breaks Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index e628b56..93c4a02 100644 --- a/Dockerfile +++ b/Dockerfile @@ -204,7 +204,7 @@ LABEL name="Nagios" \ homepage="https://www.nagios.com/" \ maintainer="Christos Manios " \ build="16" \ - org.opencontainers.image.title="Nagios" \ + org.opencontainers.image.title="Nagios" \ org.opencontainers.image.description="Nagios, the Industry Standard In IT Infrastructure Monitoring" \ org.opencontainers.image.vendor="Nagios" \ org.opencontainers.image.authors="Christos Manios " \ From 164ef4d6ad5d681844f497c5cc986822dbf14e23 Mon Sep 17 00:00:00 2001 From: Alexander Dyas Date: Thu, 9 Nov 2023 16:18:32 +0100 Subject: [PATCH 10/55] Install full wget package as the minimal busybox version exhibits "too many redirect" issues in some situations when pulling Nagios source. - Remove some trailing spaces --- Dockerfile | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index 93c4a02..636a146 100644 --- a/Dockerfile +++ b/Dockerfile @@ -53,8 +53,8 @@ RUN addgroup -S ${NAGIOS_GROUP} && \ chmod 755 /bin/gosu && \ chmod +s /bin/gosu && \ addgroup -S apache ${NAGIOS_CMDGROUP} - - + + ### ================================== ### ### STAGE 2 COMPILE NAGIOS SOURCES ### ### ================================== ### @@ -73,9 +73,9 @@ RUN apk update && \ lm-sensors net-snmp-tools \ file freeradius-client-dev libdbi-dev libpq linux-headers mariadb-dev \ mariadb-connector-c-dev perl \ - net-snmp-dev openldap-dev openssl-dev postgresql-dev + net-snmp-dev openldap-dev openssl-dev postgresql-dev wget -# Download Nagios core, plugins and nrpe sources +# Download Nagios core, plugins and nrpe sources RUN cd /tmp && \ echo -n "Downloading Nagios ${NAGIOS_VERSION} source code: " && \ wget -O nagios-core.tar.gz "https://github.com/NagiosEnterprises/nagioscore/archive/nagios-${NAGIOS_VERSION}.tar.gz" && \ @@ -157,7 +157,7 @@ RUN echo -e "\n\n =====================\n Configure NRPE\n ================= cp src/check_nrpe ${NAGIOS_HOME}/libexec/ && \ echo "NRPE installed successfully: OK" && \ echo -n "Final Nagios installed size: " && \ - du -h -s ${NAGIOS_HOME} + du -h -s ${NAGIOS_HOME} # Compile Nagios files # Create SSMTP configuration @@ -186,7 +186,7 @@ RUN echo "use_timezone=${NAGIOS_TIMEZONE}" >> ${NAGIOS_HOME}/etc/nagios.cfg && \ RUN mkdir -p /orig/apache2 && \ cp -r /etc/apache2/* /orig/apache2 && \ cp -r ${NAGIOS_HOME}/etc /orig/etc && \ - cp -r ${NAGIOS_HOME}/var /orig/var + cp -r ${NAGIOS_HOME}/var /orig/var ### ========================== ### @@ -224,7 +224,7 @@ COPY --from=builder-compile /orig /orig ADD overlay/ / -# Make +# Make RUN chmod +x /usr/local/bin/start_nagios \ /etc/sv/apache/run \ /etc/sv/nagios/run \ @@ -249,8 +249,8 @@ RUN chmod +x /usr/local/bin/start_nagios \ : '# Add mail symbolic links to ssmtp' && \ ln -s $(which ssmtp) /bin/mail && \ ln -s $(which ssmtp) /usr/sbin/mail - - + + EXPOSE 80 VOLUME "${NAGIOS_HOME}/var" "${NAGIOS_HOME}/etc" "/var/log/apache2" "/opt/Custom-Nagios-Plugins" From e4adfa67283e4d8a318ace2a741f1e0c1b57d1cd Mon Sep 17 00:00:00 2001 From: Christos Manios Date: Sun, 19 Nov 2023 12:05:53 +0200 Subject: [PATCH 11/55] Upgrade Nagios Core to 4.5.0 and Nagios Plugins to 2.4.7 (#66) - Update Github source download URLS - Github Action: Merge Docker Buildx pipeline steps into one - Github Actions: Upgrade to docker/login-action@v3, docker/setup-qemu-action@v3, docker/setup-buildx-action@v3, actions/checkout@v4 --- .github/workflows/github-build.yml | 26 +++++--------------------- Dockerfile | 15 ++++++++------- 2 files changed, 13 insertions(+), 28 deletions(-) diff --git a/.github/workflows/github-build.yml b/.github/workflows/github-build.yml index 1407c6b..ee8b732 100644 --- a/.github/workflows/github-build.yml +++ b/.github/workflows/github-build.yml @@ -54,19 +54,19 @@ jobs: run: | echo "My docker tag will be: ${{ env.action_mytag }}" - name: Login to DockerHub - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Available platforms run: echo ${{ steps.buildx.outputs.platforms }} @@ -84,27 +84,11 @@ jobs: run: | docker buildx build \ --progress plain \ - --cache-from "type=local,src=/tmp/.buildx-cache" \ - --cache-to "type=local,dest=/tmp/.buildx-cache" \ --platform linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 \ --label "gitCommit=${{ github.sha }}" \ --label "org.opencontainers.image.revision=${{ github.sha }}" \ --tag manios/nagios:${{ env.action_mytag }} \ - --output "type=image,push=false" . - - - name: Docker Buildx (push) - run: | - echo "== This branch is : ${GITHUB_REF}" - echo "Will push image manios/nagios:${{ env.action_mytag }} to DockerHub" - docker buildx build \ - --progress plain \ - --cache-from "type=local,src=/tmp/.buildx-cache" \ - --platform linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 \ - --label "gitCommit=${{ github.sha }}" \ - --label "org.opencontainers.image.revision=${{ github.sha }}" \ - --tag manios/nagios:${{ env.action_mytag }} \ --output "type=image,push=true" . - - - name: Inspect image + - name: Inspect image run: | docker buildx imagetools inspect manios/nagios:${{ env.action_mytag }} diff --git a/Dockerfile b/Dockerfile index 636a146..8725e16 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,8 +18,8 @@ ENV NAGIOS_HOME=/opt/nagios \ NAGIOS_FQDN=nagios.example.com \ NAGIOSADMIN_USER=nagiosadmin \ NAGIOSADMIN_PASS=nagios \ - NAGIOS_VERSION=4.4.14 \ - NAGIOS_PLUGINS_VERSION=2.4.6 \ + NAGIOS_VERSION=4.5.0 \ + NAGIOS_PLUGINS_VERSION=2.4.7 \ NRPE_VERSION=4.1.0 \ APACHE_LOCK_DIR=/var/run \ APACHE_LOG_DIR=/var/log/apache2 @@ -78,11 +78,11 @@ RUN apk update && \ # Download Nagios core, plugins and nrpe sources RUN cd /tmp && \ echo -n "Downloading Nagios ${NAGIOS_VERSION} source code: " && \ - wget -O nagios-core.tar.gz "https://github.com/NagiosEnterprises/nagioscore/archive/nagios-${NAGIOS_VERSION}.tar.gz" && \ + wget -O nagios-core.tar.gz "https://github.com/NagiosEnterprises/nagioscore/archive/refs/tags/nagios-${NAGIOS_VERSION}.tar.gz" && \ echo -n -e "OK\nDownloading Nagios plugins ${NAGIOS_PLUGINS_VERSION} source code: " && \ - wget -O nagios-plugins.tar.gz "https://github.com/nagios-plugins/nagios-plugins/archive/release-${NAGIOS_PLUGINS_VERSION}.tar.gz" && \ + wget -O nagios-plugins.tar.gz "https://github.com/nagios-plugins/nagios-plugins/archive/refs/tags/release-${NAGIOS_PLUGINS_VERSION}.tar.gz" && \ echo -n -e "OK\nDownloading NRPE ${NRPE_VERSION} source code: " && \ - wget -O nrpe.tar.gz "https://github.com/NagiosEnterprises/nrpe/archive/nrpe-${NRPE_VERSION}.tar.gz" && \ + wget -O nrpe.tar.gz "https://github.com/NagiosEnterprises/nrpe/archive/refs/tags/nrpe-${NRPE_VERSION}.tar.gz" && \ env && \ echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM !! == " && \ echo "OK" @@ -118,6 +118,7 @@ RUN ls -l /tmp && cd /tmp && \ # Compile Nagios Plugins RUN echo -e "\n\n ===========================\n Configure Nagios Plugins\n ===========================\n" && \ + ls -lia /tmp && cd /tmp && \ cd /tmp/nagios-plugins-release-${NAGIOS_PLUGINS_VERSION} && \ ./autogen.sh && \ ./configure --with-nagios-user=${NAGIOS_USER} \ @@ -203,7 +204,7 @@ LABEL name="Nagios" \ nrpeVersion=$NRPE_VERSION \ homepage="https://www.nagios.com/" \ maintainer="Christos Manios " \ - build="16" \ + build="17" \ org.opencontainers.image.title="Nagios" \ org.opencontainers.image.description="Nagios, the Industry Standard In IT Infrastructure Monitoring" \ org.opencontainers.image.vendor="Nagios" \ @@ -212,7 +213,7 @@ LABEL name="Nagios" \ org.opencontainers.image.url="https://hub.docker.com/r/manios/nagios" \ org.opencontainers.image.source="https://github.com/manios/docker-nagios" \ org.opencontainers.image.documentation="https://github.com/manios/docker-nagios/blob/master/README.md" \ - org.opencontainers.image.version="16" + org.opencontainers.image.version="17" RUN mkdir -p ${NAGIOS_HOME} && \ mkdir -p /orig/apache2 From f45e49cce385d75302784bd2502f6b85b2035629 Mon Sep 17 00:00:00 2001 From: Christos Manios Date: Sun, 19 Nov 2023 12:06:57 +0200 Subject: [PATCH 12/55] Release build 17. --- CHANGELOG.md | 10 ++++++++++ README.md | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cac2410..32ed667 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,16 @@ This Docker image contains more than one software (Nagios, Nagios plugins, NRPE, Apache HTTPD, etc.) with different versions. Hence we decided to name the releases with the naming `Build - ` which will have an incremental unsigned integer. In this document we will describe the contents of every image in every build. + +## Build 17 (2023-11-20) + +* Nagios core: v4.5.0 +* Nagios plugins: v2.4.7 +* NRPE: 4.1.0 + +* Upgrade to Nagios Core to `4.5.0`, Nagios plugins to `2.4.7`. ([#66](https://github.com/manios/docker-nagios/issues/66)) +* Avoid busybox wget `too many redirect` issue. ([#65](https://github.com/manios/docker-nagios/pull/65)) + ## Build 16 (2023-08-09) * Nagios core: v4.4.14 diff --git a/README.md b/README.md index db7c3ff..00e4262 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Build Status: ## Supported tags and respective `Dockerfile` links -* `4.4.14`, `4.4`, `latest` [(4.4.14/Dockerfile)](https://github.com/manios/docker-nagios/blob/master/Dockerfile) +* `4.5.0`, `4.5`, `latest` [(4.5.0/Dockerfile)](https://github.com/manios/docker-nagios/blob/master/Dockerfile) For more information about the image versions you may refer to the [CHANGELOG](https://github.com/manios/docker-nagios/blob/master/CHANGELOG.md) From 1a74ebaa5dffa19c5f8c22edfc63266bef4e973d Mon Sep 17 00:00:00 2001 From: Christos Manios Date: Mon, 20 Nov 2023 00:16:34 +0200 Subject: [PATCH 13/55] Add missing changelog header. --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 32ed667..5742101 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ This Docker image contains more than one software (Nagios, Nagios plugins, NRPE, * Nagios plugins: v2.4.7 * NRPE: 4.1.0 +### Features + * Upgrade to Nagios Core to `4.5.0`, Nagios plugins to `2.4.7`. ([#66](https://github.com/manios/docker-nagios/issues/66)) * Avoid busybox wget `too many redirect` issue. ([#65](https://github.com/manios/docker-nagios/pull/65)) From 224e43183d70c0ee36f673500edfaf98eb7db69e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dennis=20Maienh=C3=B6fer?= <13888192+derco0n@users.noreply.github.com> Date: Mon, 24 Jul 2023 16:19:15 +0200 Subject: [PATCH 14/55] Create docker-compose-portainer.yaml --- docker-compose-portainer.yaml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 docker-compose-portainer.yaml diff --git a/docker-compose-portainer.yaml b/docker-compose-portainer.yaml new file mode 100644 index 0000000..e3c53ed --- /dev/null +++ b/docker-compose-portainer.yaml @@ -0,0 +1,21 @@ +version: '3.8' +services: + nagios: + image: manios/nagios:latest + volumes: + # you may adjust your folder-mappings here + - /opt/containers/nagios/opt/nagios/etc:/opt/nagios/etc + - /opt/containers/nagios/opt/nagios/var:/opt/nagios/var + - /opt/containers/nagios/ssmtp:/etc/ssmtp + - /opt/containers/nagios/opt/Custom-Nagios-Plugins:/opt/Custom-Nagios-Plugins + + ports: + - "9080:80" + + environment: + # yo may adjust username and password here or remove it to use the default + NAGIOSADMIN_USER: "godmode" + NAGIOSADMIN_PASS: "secretpass" + # set your timezone below like e.g. + #NAGIOS_TIMEZONE: "Europe/Berlin" + NAGIOS_TIMEZONE: "UTC" From 6b550aa657ddd16c8d6283cd15dfd4d495115f46 Mon Sep 17 00:00:00 2001 From: Christos Manios Date: Mon, 20 Nov 2023 11:16:57 +0200 Subject: [PATCH 15/55] Update link of Github Action build badge. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 00e4262..292cf83 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Docker image for [Nagios](https://www.nagios.org/), the Industry Standard In IT The image is inspired by [JasonRivers/Docker-Nagios](https://github.com/JasonRivers/Docker-Nagios) image (Kudos to Jason!) but follows a different approach targetted to lightweight size and basic features. Build Status: - ![build status badge](https://github.com/manios/docker-nagios/workflows/Nagios%20Build/badge.svg?branch=master) [![](https://images.microbadger.com/badges/image/manios/nagios.svg)](https://microbadger.com/images/manios/nagios) [![Docker pulls badge](https://img.shields.io/docker/pulls/manios/nagios.svg)](https://hub.docker.com/r/manios/nagios) [![Docker stars badge](https://img.shields.io/docker/stars/manios/nagios.svg)](https://hub.docker.com/r/manios/nagios) [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://github.com/manios/docker-nagios/blob/master/LICENCE) + [![Nagios Build](https://github.com/manios/docker-nagios/actions/workflows/github-build.yml/badge.svg?branch=master)](https://github.com/manios/docker-nagios/actions/workflows/github-build.yml) [![Docker pulls badge](https://img.shields.io/docker/pulls/manios/nagios.svg)](https://hub.docker.com/r/manios/nagios) [![Docker stars badge](https://img.shields.io/docker/stars/manios/nagios.svg)](https://hub.docker.com/r/manios/nagios) [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://github.com/manios/docker-nagios/blob/master/LICENCE) * **Available architectures**: `x86`, `amd64`, `arm/v6`, `arm/v7`, `arm64` * **Where to file issues**: https://github.com/manios/docker-nagios/issues From 7507283f0575ad6110f99a386dca156e78f38435 Mon Sep 17 00:00:00 2001 From: Christos Manios Date: Thu, 7 Mar 2024 18:36:15 +0200 Subject: [PATCH 16/55] Upgrade Nagios Core to 4.5.1 and Nagios Plugins to 2.4.8 (#68) --- .github/workflows/github-build.yml | 2 +- CHANGELOG.md | 10 ++++++++++ Dockerfile | 6 +++--- README.md | 2 +- 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/.github/workflows/github-build.yml b/.github/workflows/github-build.yml index ee8b732..00476b9 100644 --- a/.github/workflows/github-build.yml +++ b/.github/workflows/github-build.yml @@ -72,7 +72,7 @@ jobs: run: echo ${{ steps.buildx.outputs.platforms }} - name: Cache Docker layers for this Git branch - uses: actions/cache@v3 + uses: actions/cache@v4 id: cache with: path: /tmp/.buildx-cache diff --git a/CHANGELOG.md b/CHANGELOG.md index 5742101..819077f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,16 @@ This Docker image contains more than one software (Nagios, Nagios plugins, NRPE, Apache HTTPD, etc.) with different versions. Hence we decided to name the releases with the naming `Build - ` which will have an incremental unsigned integer. In this document we will describe the contents of every image in every build. +## Build 18 (2024-03-10) + +* Nagios core: v4.5.1 +* Nagios plugins: v2.4.8 +* NRPE: 4.1.0 + +### Features + +* Upgrade to Nagios Core to `4.5.1`, Nagios plugins to `2.4.8`. ([#68](https://github.com/manios/docker-nagios/issues/68)) + ## Build 17 (2023-11-20) * Nagios core: v4.5.0 diff --git a/Dockerfile b/Dockerfile index 8725e16..a061431 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,8 +18,8 @@ ENV NAGIOS_HOME=/opt/nagios \ NAGIOS_FQDN=nagios.example.com \ NAGIOSADMIN_USER=nagiosadmin \ NAGIOSADMIN_PASS=nagios \ - NAGIOS_VERSION=4.5.0 \ - NAGIOS_PLUGINS_VERSION=2.4.7 \ + NAGIOS_VERSION=4.5.1 \ + NAGIOS_PLUGINS_VERSION=2.4.8 \ NRPE_VERSION=4.1.0 \ APACHE_LOCK_DIR=/var/run \ APACHE_LOG_DIR=/var/log/apache2 @@ -204,7 +204,7 @@ LABEL name="Nagios" \ nrpeVersion=$NRPE_VERSION \ homepage="https://www.nagios.com/" \ maintainer="Christos Manios " \ - build="17" \ + build="18" \ org.opencontainers.image.title="Nagios" \ org.opencontainers.image.description="Nagios, the Industry Standard In IT Infrastructure Monitoring" \ org.opencontainers.image.vendor="Nagios" \ diff --git a/README.md b/README.md index 292cf83..5eef7bf 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Build Status: ## Supported tags and respective `Dockerfile` links -* `4.5.0`, `4.5`, `latest` [(4.5.0/Dockerfile)](https://github.com/manios/docker-nagios/blob/master/Dockerfile) +* `4.5.1`, `4.5`, `latest` [(4.5.1/Dockerfile)](https://github.com/manios/docker-nagios/blob/master/Dockerfile) For more information about the image versions you may refer to the [CHANGELOG](https://github.com/manios/docker-nagios/blob/master/CHANGELOG.md) From 64a4da80a7ddb11d008f4207143b3ba65eb6901c Mon Sep 17 00:00:00 2001 From: Christos Manios Date: Tue, 7 May 2024 12:10:02 +0300 Subject: [PATCH 17/55] Upgrade Nagios Core to 4.5.2 and Nagios Plugins to 2.4.10 and Linux Alpine to 3.18 (#69) --- CHANGELOG.md | 10 ++++++++++ Dockerfile | 8 ++++---- README.md | 2 +- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 819077f..88c3682 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,16 @@ This Docker image contains more than one software (Nagios, Nagios plugins, NRPE, Apache HTTPD, etc.) with different versions. Hence we decided to name the releases with the naming `Build - ` which will have an incremental unsigned integer. In this document we will describe the contents of every image in every build. +## Build 19 (2024-05-07) + +* Nagios core: v4.5.2 +* Nagios plugins: v2.4.10 +* NRPE: 4.1.0 + +### Features + +* Upgrade to Nagios Core to `4.5.2`, Nagios plugins to `2.4.19`. ([#69](https://github.com/manios/docker-nagios/issues/69)) + ## Build 18 (2024-03-10) * Nagios core: v4.5.1 diff --git a/Dockerfile b/Dockerfile index a061431..0a131f0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,8 +18,8 @@ ENV NAGIOS_HOME=/opt/nagios \ NAGIOS_FQDN=nagios.example.com \ NAGIOSADMIN_USER=nagiosadmin \ NAGIOSADMIN_PASS=nagios \ - NAGIOS_VERSION=4.5.1 \ - NAGIOS_PLUGINS_VERSION=2.4.8 \ + NAGIOS_VERSION=4.5.2 \ + NAGIOS_PLUGINS_VERSION=2.4.10 \ NRPE_VERSION=4.1.0 \ APACHE_LOCK_DIR=/var/run \ APACHE_LOG_DIR=/var/log/apache2 @@ -204,7 +204,7 @@ LABEL name="Nagios" \ nrpeVersion=$NRPE_VERSION \ homepage="https://www.nagios.com/" \ maintainer="Christos Manios " \ - build="18" \ + build="19" \ org.opencontainers.image.title="Nagios" \ org.opencontainers.image.description="Nagios, the Industry Standard In IT Infrastructure Monitoring" \ org.opencontainers.image.vendor="Nagios" \ @@ -213,7 +213,7 @@ LABEL name="Nagios" \ org.opencontainers.image.url="https://hub.docker.com/r/manios/nagios" \ org.opencontainers.image.source="https://github.com/manios/docker-nagios" \ org.opencontainers.image.documentation="https://github.com/manios/docker-nagios/blob/master/README.md" \ - org.opencontainers.image.version="17" + org.opencontainers.image.version="19" RUN mkdir -p ${NAGIOS_HOME} && \ mkdir -p /orig/apache2 diff --git a/README.md b/README.md index 5eef7bf..9e168de 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Build Status: ## Supported tags and respective `Dockerfile` links -* `4.5.1`, `4.5`, `latest` [(4.5.1/Dockerfile)](https://github.com/manios/docker-nagios/blob/master/Dockerfile) +* `4.5.2`, `4.5`, `latest` [(4.5.2/Dockerfile)](https://github.com/manios/docker-nagios/blob/master/Dockerfile) For more information about the image versions you may refer to the [CHANGELOG](https://github.com/manios/docker-nagios/blob/master/CHANGELOG.md) From 2bdffc955a3c0dcd51c87e38d4fa72ad1b914564 Mon Sep 17 00:00:00 2001 From: Christos Manios Date: Wed, 29 May 2024 22:22:34 +0300 Subject: [PATCH 18/55] Improve documentation regarding SSMTP configuration (#71) --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9e168de..dc859c8 100644 --- a/README.md +++ b/README.md @@ -40,9 +40,9 @@ Notes: 1. The container populates with default configuration files if the configuration directories are empty. 1. The path for the custom plugins will be /opt/Custom-Nagios-Plugins, you will need to reference this directory in your configuration scripts. -1. In order to receive mail notifications, you have to configure SSMTP. You can find example configuration in `docker-nagios`. +1. In order to receive mail notifications, you have to configure SSMTP. You can find example configuration inside the container in the file `/etc/ssmtp/ssmtp.conf` or in the repository in [overlay/etc/ssmtp/ssmtp.conf](https://github.com/manios/docker-nagios/blob/master/overlay/etc/ssmtp/ssmtp.conf). -For best results your Nagios container should have access to both IPv4 & IPv6 networks +For best results your Nagios container should have access to both IPv4 & IPv6 networks. ### Credentials From 8482b61938b8aeb1413892c413c93b9bf5cfe28d Mon Sep 17 00:00:00 2001 From: Zsombor Date: Wed, 26 Jun 2024 21:45:44 +0200 Subject: [PATCH 19/55] Upgrade Nagios Core to 4.5.3 (#73) - Use GITHUB_ACTOR variable in pipeline instead of manios username --- .github/workflows/github-build.yml | 5 +++-- Dockerfile | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/github-build.yml b/.github/workflows/github-build.yml index 00476b9..56c68d1 100644 --- a/.github/workflows/github-build.yml +++ b/.github/workflows/github-build.yml @@ -6,6 +6,7 @@ name: Nagios Build # https://github.com/marketplace/actions/docker-setup-buildx # https://github.com/marketplace/actions/docker-login # https://stackoverflow.com/questions/58033366/how-to-get-current-branch-within-github-actions/58034787 + on: [push] jobs: @@ -87,8 +88,8 @@ jobs: --platform linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 \ --label "gitCommit=${{ github.sha }}" \ --label "org.opencontainers.image.revision=${{ github.sha }}" \ - --tag manios/nagios:${{ env.action_mytag }} \ + --tag ${GITHUB_ACTOR}/nagios:${{ env.action_mytag }} \ --output "type=image,push=true" . - name: Inspect image run: | - docker buildx imagetools inspect manios/nagios:${{ env.action_mytag }} + docker buildx imagetools inspect ${GITHUB_ACTOR}/nagios:${{ env.action_mytag }} diff --git a/Dockerfile b/Dockerfile index 0a131f0..e8b75e6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,7 +18,7 @@ ENV NAGIOS_HOME=/opt/nagios \ NAGIOS_FQDN=nagios.example.com \ NAGIOSADMIN_USER=nagiosadmin \ NAGIOSADMIN_PASS=nagios \ - NAGIOS_VERSION=4.5.2 \ + NAGIOS_VERSION=4.5.3 \ NAGIOS_PLUGINS_VERSION=2.4.10 \ NRPE_VERSION=4.1.0 \ APACHE_LOCK_DIR=/var/run \ @@ -204,7 +204,7 @@ LABEL name="Nagios" \ nrpeVersion=$NRPE_VERSION \ homepage="https://www.nagios.com/" \ maintainer="Christos Manios " \ - build="19" \ + build="20" \ org.opencontainers.image.title="Nagios" \ org.opencontainers.image.description="Nagios, the Industry Standard In IT Infrastructure Monitoring" \ org.opencontainers.image.vendor="Nagios" \ @@ -213,7 +213,7 @@ LABEL name="Nagios" \ org.opencontainers.image.url="https://hub.docker.com/r/manios/nagios" \ org.opencontainers.image.source="https://github.com/manios/docker-nagios" \ org.opencontainers.image.documentation="https://github.com/manios/docker-nagios/blob/master/README.md" \ - org.opencontainers.image.version="19" + org.opencontainers.image.version="20" RUN mkdir -p ${NAGIOS_HOME} && \ mkdir -p /orig/apache2 From 4977b79690b41a9aac6ae0e4f2c74a961309d8bb Mon Sep 17 00:00:00 2001 From: Christos Manios Date: Mon, 29 Jul 2024 20:44:15 +0300 Subject: [PATCH 20/55] Update changelog for build 20 --- CHANGELOG.md | 10 ++++++++++ README.md | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 88c3682..e4b5f86 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,16 @@ This Docker image contains more than one software (Nagios, Nagios plugins, NRPE, Apache HTTPD, etc.) with different versions. Hence we decided to name the releases with the naming `Build - ` which will have an incremental unsigned integer. In this document we will describe the contents of every image in every build. +## Build 20 (2024-07-30) + +* Nagios core: v4.5.3 +* Nagios plugins: v2.4.10 +* NRPE: 4.1.0 + +### Features + +* Upgrade to Nagios Core to `4.5.3`. ([#73](https://github.com/manios/docker-nagios/issues/73)) + ## Build 19 (2024-05-07) diff --git a/README.md b/README.md index dc859c8..3b4127c 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Build Status: ## Supported tags and respective `Dockerfile` links -* `4.5.2`, `4.5`, `latest` [(4.5.2/Dockerfile)](https://github.com/manios/docker-nagios/blob/master/Dockerfile) +* `4.5.3`, `4.5`, `latest` [(4.5.3/Dockerfile)](https://github.com/manios/docker-nagios/blob/master/Dockerfile) For more information about the image versions you may refer to the [CHANGELOG](https://github.com/manios/docker-nagios/blob/master/CHANGELOG.md) From 786a3d6aa4e30336974c17be5c3018a538752e04 Mon Sep 17 00:00:00 2001 From: Christos Manios Date: Thu, 15 Aug 2024 14:42:27 +0300 Subject: [PATCH 21/55] Upgrade to Nagios Core to 4.5.4, Nagios Plugins to 2.4.11 and NRPE to 4.1.1 (#74, #75) --- CHANGELOG.md | 10 ++++++++++ Dockerfile | 8 ++++---- README.md | 2 +- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e4b5f86..b3bd516 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,16 @@ This Docker image contains more than one software (Nagios, Nagios plugins, NRPE, Apache HTTPD, etc.) with different versions. Hence we decided to name the releases with the naming `Build - ` which will have an incremental unsigned integer. In this document we will describe the contents of every image in every build. +## Build 21 (2024-08-15) + +* Nagios core: v4.5.4 +* Nagios plugins: v2.4.11 +* NRPE: 4.1.1 + +### Features + +* Upgrade to Nagios Core to `4.5.3`, Nagios Plugins to `2.4.11` and NRPE to `4.1.1` . ([#75](https://github.com/manios/docker-nagios/issues/75)) + ## Build 20 (2024-07-30) * Nagios core: v4.5.3 diff --git a/Dockerfile b/Dockerfile index e8b75e6..1806be0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,9 +18,9 @@ ENV NAGIOS_HOME=/opt/nagios \ NAGIOS_FQDN=nagios.example.com \ NAGIOSADMIN_USER=nagiosadmin \ NAGIOSADMIN_PASS=nagios \ - NAGIOS_VERSION=4.5.3 \ - NAGIOS_PLUGINS_VERSION=2.4.10 \ - NRPE_VERSION=4.1.0 \ + NAGIOS_VERSION=4.5.4 \ + NAGIOS_PLUGINS_VERSION=2.4.11 \ + NRPE_VERSION=4.1.1 \ APACHE_LOCK_DIR=/var/run \ APACHE_LOG_DIR=/var/log/apache2 @@ -204,7 +204,7 @@ LABEL name="Nagios" \ nrpeVersion=$NRPE_VERSION \ homepage="https://www.nagios.com/" \ maintainer="Christos Manios " \ - build="20" \ + build="21" \ org.opencontainers.image.title="Nagios" \ org.opencontainers.image.description="Nagios, the Industry Standard In IT Infrastructure Monitoring" \ org.opencontainers.image.vendor="Nagios" \ diff --git a/README.md b/README.md index 3b4127c..bf33e68 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Build Status: ## Supported tags and respective `Dockerfile` links -* `4.5.3`, `4.5`, `latest` [(4.5.3/Dockerfile)](https://github.com/manios/docker-nagios/blob/master/Dockerfile) +* `4.5.4`, `4.5`, `latest` [(4.5.3/Dockerfile)](https://github.com/manios/docker-nagios/blob/master/Dockerfile) For more information about the image versions you may refer to the [CHANGELOG](https://github.com/manios/docker-nagios/blob/master/CHANGELOG.md) From 696411326204a3c6e7cb9d25a811586fcd60b393 Mon Sep 17 00:00:00 2001 From: Christos Manios Date: Fri, 30 Aug 2024 20:49:16 +0300 Subject: [PATCH 22/55] Fix error shown in Hosts and Services web page when running the container with a user other than nagiosadmin (#78) --- overlay/usr/local/bin/start_nagios | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/overlay/usr/local/bin/start_nagios b/overlay/usr/local/bin/start_nagios index 51b1017..751ed2c 100755 --- a/overlay/usr/local/bin/start_nagios +++ b/overlay/usr/local/bin/start_nagios @@ -21,6 +21,18 @@ if [ ! -f "${NAGIOS_HOME}/etc/htpasswd.users" ] ; then chown -R ${NAGIOS_USER}.${NAGIOS_GROUP} "${NAGIOS_HOME}/etc/htpasswd.users" fi +# Set current $NAGIOSADMIN_USER to the configuration of $NAGIOS_HOME/etc/cgi.cfg +if [ "${NAGIOSADMIN_USER}" != "nagiosadmin" ]; then + echo "Modifying ${NAGIOS_HOME}/etc/cgi.cfg in order to use ${NAGIOSADMIN_USER} as its authorised user" + sed -i "s|\(authorized_for_system_information=\).*|\1${NAGIOSADMIN_USER}|g" /opt/nagios/etc/cgi.cfg + sed -i "s|\(authorized_for_configuration_information=\).*|\1${NAGIOSADMIN_USER}|g" /opt/nagios/etc/cgi.cfg + sed -i "s|\(authorized_for_system_commands=\).*|\1${NAGIOSADMIN_USER}|g" /opt/nagios/etc/cgi.cfg + sed -i "s|\(authorized_for_all_services=\).*|\1${NAGIOSADMIN_USER}|g" /opt/nagios/etc/cgi.cfg + sed -i "s|\(authorized_for_all_hosts=\).*|\1${NAGIOSADMIN_USER}|g" /opt/nagios/etc/cgi.cfg + sed -i "s|\(authorized_for_all_service_commands=\).*|\1${NAGIOSADMIN_USER}|g" /opt/nagios/etc/cgi.cfg + sed -i "s|\(authorized_for_all_host_commands=\).*|\1${NAGIOSADMIN_USER}|g" /opt/nagios/etc/cgi.cfg +fi + # Remove pid files echo -n "Removing Apache HTTPD PID file before starting it ..." From 77e8550ce5fdd63544bd4aa0993e002d436ad4f8 Mon Sep 17 00:00:00 2001 From: Christos Manios Date: Fri, 30 Aug 2024 19:29:36 +0300 Subject: [PATCH 23/55] Release build 22. Upgrade to Nagios Plugins 2.4.12 (#79) --- CHANGELOG.md | 14 ++++++++++++++ Dockerfile | 6 +++--- README.md | 2 +- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b3bd516..5f41330 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,20 @@ This Docker image contains more than one software (Nagios, Nagios plugins, NRPE, Apache HTTPD, etc.) with different versions. Hence we decided to name the releases with the naming `Build - ` which will have an incremental unsigned integer. In this document we will describe the contents of every image in every build. +## Build 22 (2024-08-30) + +* Nagios core: v4.5.4 +* Nagios plugins: v2.4.12 +* NRPE: 4.1.1 + +### Features + +* Upgrade to Nagios Plugins to `2.4.12`. ([#79](https://github.com/manios/docker-nagios/issues/79)) + +### Bug Fixes + +* Fix error shown in Hosts and Services web page when running the container with a user other than nagiosadmin (#78) Thanks [@pathia](https://github.com/pathia)! + ## Build 21 (2024-08-15) * Nagios core: v4.5.4 diff --git a/Dockerfile b/Dockerfile index 1806be0..d4ba7d4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,7 +19,7 @@ ENV NAGIOS_HOME=/opt/nagios \ NAGIOSADMIN_USER=nagiosadmin \ NAGIOSADMIN_PASS=nagios \ NAGIOS_VERSION=4.5.4 \ - NAGIOS_PLUGINS_VERSION=2.4.11 \ + NAGIOS_PLUGINS_VERSION=2.4.12 \ NRPE_VERSION=4.1.1 \ APACHE_LOCK_DIR=/var/run \ APACHE_LOG_DIR=/var/log/apache2 @@ -204,7 +204,7 @@ LABEL name="Nagios" \ nrpeVersion=$NRPE_VERSION \ homepage="https://www.nagios.com/" \ maintainer="Christos Manios " \ - build="21" \ + build="22" \ org.opencontainers.image.title="Nagios" \ org.opencontainers.image.description="Nagios, the Industry Standard In IT Infrastructure Monitoring" \ org.opencontainers.image.vendor="Nagios" \ @@ -213,7 +213,7 @@ LABEL name="Nagios" \ org.opencontainers.image.url="https://hub.docker.com/r/manios/nagios" \ org.opencontainers.image.source="https://github.com/manios/docker-nagios" \ org.opencontainers.image.documentation="https://github.com/manios/docker-nagios/blob/master/README.md" \ - org.opencontainers.image.version="20" + org.opencontainers.image.version="22" RUN mkdir -p ${NAGIOS_HOME} && \ mkdir -p /orig/apache2 diff --git a/README.md b/README.md index bf33e68..8d6416d 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Build Status: ## Supported tags and respective `Dockerfile` links -* `4.5.4`, `4.5`, `latest` [(4.5.3/Dockerfile)](https://github.com/manios/docker-nagios/blob/master/Dockerfile) +* `4.5.4`, `4.5`, `latest` [(4.5.4/Dockerfile)](https://github.com/manios/docker-nagios/blob/master/Dockerfile) For more information about the image versions you may refer to the [CHANGELOG](https://github.com/manios/docker-nagios/blob/master/CHANGELOG.md) From 0a90f75035cfdab0adca8e5c3791776d744b07c9 Mon Sep 17 00:00:00 2001 From: Christos Manios Date: Wed, 25 Sep 2024 09:38:41 +0300 Subject: [PATCH 24/55] Upgrade to Nagios Core to 4.5.5 (#81) --- CHANGELOG.md | 10 ++++++++++ Dockerfile | 6 +++--- README.md | 2 +- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f41330..93adf05 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,16 @@ This Docker image contains more than one software (Nagios, Nagios plugins, NRPE, Apache HTTPD, etc.) with different versions. Hence we decided to name the releases with the naming `Build - ` which will have an incremental unsigned integer. In this document we will describe the contents of every image in every build. +## Build 23 (2024-09-25) + +* Nagios core: v4.5.5 +* Nagios plugins: v2.4.12 +* NRPE: 4.1.1 + +### Features + +* Upgrade to Nagios Core `4.5.5`. ([#81](https://github.com/manios/docker-nagios/issues/81)) + ## Build 22 (2024-08-30) * Nagios core: v4.5.4 diff --git a/Dockerfile b/Dockerfile index d4ba7d4..c2f7006 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,7 +18,7 @@ ENV NAGIOS_HOME=/opt/nagios \ NAGIOS_FQDN=nagios.example.com \ NAGIOSADMIN_USER=nagiosadmin \ NAGIOSADMIN_PASS=nagios \ - NAGIOS_VERSION=4.5.4 \ + NAGIOS_VERSION=4.5.5 \ NAGIOS_PLUGINS_VERSION=2.4.12 \ NRPE_VERSION=4.1.1 \ APACHE_LOCK_DIR=/var/run \ @@ -204,7 +204,7 @@ LABEL name="Nagios" \ nrpeVersion=$NRPE_VERSION \ homepage="https://www.nagios.com/" \ maintainer="Christos Manios " \ - build="22" \ + build="23-snapshot" \ org.opencontainers.image.title="Nagios" \ org.opencontainers.image.description="Nagios, the Industry Standard In IT Infrastructure Monitoring" \ org.opencontainers.image.vendor="Nagios" \ @@ -213,7 +213,7 @@ LABEL name="Nagios" \ org.opencontainers.image.url="https://hub.docker.com/r/manios/nagios" \ org.opencontainers.image.source="https://github.com/manios/docker-nagios" \ org.opencontainers.image.documentation="https://github.com/manios/docker-nagios/blob/master/README.md" \ - org.opencontainers.image.version="22" + org.opencontainers.image.version="23-snapshot" RUN mkdir -p ${NAGIOS_HOME} && \ mkdir -p /orig/apache2 diff --git a/README.md b/README.md index 8d6416d..c9e9df7 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Build Status: ## Supported tags and respective `Dockerfile` links -* `4.5.4`, `4.5`, `latest` [(4.5.4/Dockerfile)](https://github.com/manios/docker-nagios/blob/master/Dockerfile) +* `4.5.5`, `4.5`, `latest` [(4.5.5/Dockerfile)](https://github.com/manios/docker-nagios/blob/master/Dockerfile) For more information about the image versions you may refer to the [CHANGELOG](https://github.com/manios/docker-nagios/blob/master/CHANGELOG.md) From 6a4bd9d5248290debf4ba35a702125be8b304c7d Mon Sep 17 00:00:00 2001 From: Christos Manios Date: Sun, 1 Sep 2024 14:24:09 +0300 Subject: [PATCH 25/55] Push container images to Github Container Registry (#83) --- .github/workflows/github-build.yml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/github-build.yml b/.github/workflows/github-build.yml index 56c68d1..ba1679d 100644 --- a/.github/workflows/github-build.yml +++ b/.github/workflows/github-build.yml @@ -59,6 +59,12 @@ jobs: with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Checkout uses: actions/checkout@v4 @@ -80,8 +86,7 @@ jobs: key: ${{ runner.os }}-buildx-${{ github.ref }} restore-keys: | ${{ runner.os }}-buildx-${{ github.ref }} - - - name: Docker Buildx (build and cache) + - name: Docker Buildx (build and cache) for DockerHub run: | docker buildx build \ --progress plain \ @@ -90,6 +95,15 @@ jobs: --label "org.opencontainers.image.revision=${{ github.sha }}" \ --tag ${GITHUB_ACTOR}/nagios:${{ env.action_mytag }} \ --output "type=image,push=true" . + - name: Docker Buildx (build and cache) for GitHub Container Registry + run: | + docker buildx build \ + --progress plain \ + --platform linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 \ + --label "gitCommit=${{ github.sha }}" \ + --label "org.opencontainers.image.revision=${{ github.sha }}" \ + --tag ghcr.io/${GITHUB_ACTOR}/nagios:${{ env.action_mytag }} \ + --output "type=image,push=true" . - name: Inspect image run: | docker buildx imagetools inspect ${GITHUB_ACTOR}/nagios:${{ env.action_mytag }} From 45cf3347e3d74307a34a040d955c770d64c9b672 Mon Sep 17 00:00:00 2001 From: Christos Manios Date: Sun, 1 Sep 2024 14:36:06 +0300 Subject: [PATCH 26/55] Re-enable Docker image caching using Cache action (#82) --- .github/workflows/github-build.yml | 23 ++++++++++++++++++++--- README.md | 7 +++++++ 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/.github/workflows/github-build.yml b/.github/workflows/github-build.yml index ba1679d..5d5e7c4 100644 --- a/.github/workflows/github-build.yml +++ b/.github/workflows/github-build.yml @@ -86,24 +86,41 @@ jobs: key: ${{ runner.os }}-buildx-${{ github.ref }} restore-keys: | ${{ runner.os }}-buildx-${{ github.ref }} - - name: Docker Buildx (build and cache) for DockerHub + - name: Docker Buildx (build and cache) run: | docker buildx build \ --progress plain \ + --cache-from "type=local,src=/tmp/.buildx-cache" \ + --cache-to "type=local,dest=/tmp/.buildx-cache" \ + --platform linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 \ + --label "gitCommit=${{ github.sha }}" \ + --label "org.opencontainers.image.revision=${{ github.sha }}" \ + --tag ${GITHUB_ACTOR}/nagios:${{ env.action_mytag }} \ + --output "type=image,push=false" . + - name: 'Docker Buildx: Push to Dockerhub' + run: | + echo "== This branch is : ${GITHUB_REF}" + echo "Will push image ${GITHUB_ACTOR}/nagios:${{ env.action_mytag }} to DockerHub" + docker buildx build \ + --progress plain \ + --cache-from "type=local,src=/tmp/.buildx-cache" \ --platform linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 \ --label "gitCommit=${{ github.sha }}" \ --label "org.opencontainers.image.revision=${{ github.sha }}" \ --tag ${GITHUB_ACTOR}/nagios:${{ env.action_mytag }} \ --output "type=image,push=true" . - - name: Docker Buildx (build and cache) for GitHub Container Registry + - name: 'Docker Buildx: Push to GitHub Container Registry' run: | + echo "== This branch is : ${GITHUB_REF}" + echo "Will push image ghcr.io/${GITHUB_ACTOR}/nagios:${{ env.action_mytag }} to GitHub Container Registry" docker buildx build \ --progress plain \ + --cache-from "type=local,src=/tmp/.buildx-cache" \ --platform linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 \ --label "gitCommit=${{ github.sha }}" \ --label "org.opencontainers.image.revision=${{ github.sha }}" \ --tag ghcr.io/${GITHUB_ACTOR}/nagios:${{ env.action_mytag }} \ - --output "type=image,push=true" . + --output "type=image,push=true" . - name: Inspect image run: | docker buildx imagetools inspect ${GITHUB_ACTOR}/nagios:${{ env.action_mytag }} diff --git a/README.md b/README.md index c9e9df7..7dc243d 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,13 @@ Build Status: For more information about the image versions you may refer to the [CHANGELOG](https://github.com/manios/docker-nagios/blob/master/CHANGELOG.md) +## Container registries + +Since `build-23` ([CHANGELOG](https://github.com/manios/docker-nagios/blob/build-23/CHANGELOG.md#build-23-2024-09-29)), the Nagios Docker image is available in Dockerhub and Github Container Registry (GHCR). You can pull it using one of the following ways: + +1. Dockerhub: `docker pull manios/nagios:latest` +1. Github Container Registry: `docker pull ghcr.io/manios/nagios:latest` + ## Running Run with the example configuration with the following: From b9aab3b10dacada47a35c925b4e1fe47ce6254d4 Mon Sep 17 00:00:00 2001 From: Christos Manios Date: Sun, 29 Sep 2024 14:25:06 +0300 Subject: [PATCH 27/55] Release build 23. --- CHANGELOG.md | 6 ++++-- Dockerfile | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 93adf05..4517289 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ This Docker image contains more than one software (Nagios, Nagios plugins, NRPE, Apache HTTPD, etc.) with different versions. Hence we decided to name the releases with the naming `Build - ` which will have an incremental unsigned integer. In this document we will describe the contents of every image in every build. -## Build 23 (2024-09-25) +## Build 23 (2024-09-29) * Nagios core: v4.5.5 * Nagios plugins: v2.4.12 @@ -12,6 +12,8 @@ This Docker image contains more than one software (Nagios, Nagios plugins, NRPE, ### Features * Upgrade to Nagios Core `4.5.5`. ([#81](https://github.com/manios/docker-nagios/issues/81)) +* Push container images to Github Container Registry ([#83](https://github.com/manios/docker-nagios/issues/83)) +* Re-enable Docker image caching using Cache action ([#82](https://github.com/manios/docker-nagios/issues/82)) ## Build 22 (2024-08-30) @@ -25,7 +27,7 @@ This Docker image contains more than one software (Nagios, Nagios plugins, NRPE, ### Bug Fixes -* Fix error shown in Hosts and Services web page when running the container with a user other than nagiosadmin (#78) Thanks [@pathia](https://github.com/pathia)! +* Fix error shown in Hosts and Services web page when running the container with a user other than nagiosadmin ([#78](https://github.com/manios/docker-nagios/issues/78)) Thanks [@pathia](https://github.com/pathia)! ## Build 21 (2024-08-15) diff --git a/Dockerfile b/Dockerfile index c2f7006..9f7f057 100644 --- a/Dockerfile +++ b/Dockerfile @@ -204,7 +204,7 @@ LABEL name="Nagios" \ nrpeVersion=$NRPE_VERSION \ homepage="https://www.nagios.com/" \ maintainer="Christos Manios " \ - build="23-snapshot" \ + build="23" \ org.opencontainers.image.title="Nagios" \ org.opencontainers.image.description="Nagios, the Industry Standard In IT Infrastructure Monitoring" \ org.opencontainers.image.vendor="Nagios" \ @@ -213,7 +213,7 @@ LABEL name="Nagios" \ org.opencontainers.image.url="https://hub.docker.com/r/manios/nagios" \ org.opencontainers.image.source="https://github.com/manios/docker-nagios" \ org.opencontainers.image.documentation="https://github.com/manios/docker-nagios/blob/master/README.md" \ - org.opencontainers.image.version="23-snapshot" + org.opencontainers.image.version="23" RUN mkdir -p ${NAGIOS_HOME} && \ mkdir -p /orig/apache2 From 4920d986192fb98c551df26aabd1cce0f7f51aba Mon Sep 17 00:00:00 2001 From: Christos Manios Date: Thu, 10 Oct 2024 14:08:59 +0300 Subject: [PATCH 28/55] Upgrade to Nagios Core to 4.5.6 (#84) --- CHANGELOG.md | 10 ++++++++++ Dockerfile | 6 +++--- LICENCE | 4 ++-- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4517289..426f8bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,16 @@ This Docker image contains more than one software (Nagios, Nagios plugins, NRPE, Apache HTTPD, etc.) with different versions. Hence we decided to name the releases with the naming `Build - ` which will have an incremental unsigned integer. In this document we will describe the contents of every image in every build. +## Build 24 (2024-10-10) + +* Nagios core: v4.5.6 +* Nagios plugins: v2.4.12 +* NRPE: 4.1.1 + +### Features + +* Upgrade to Nagios Core `4.5.6`. ([#84](https://github.com/manios/docker-nagios/issues/84)) + ## Build 23 (2024-09-29) * Nagios core: v4.5.5 diff --git a/Dockerfile b/Dockerfile index 9f7f057..7bcc788 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,7 +18,7 @@ ENV NAGIOS_HOME=/opt/nagios \ NAGIOS_FQDN=nagios.example.com \ NAGIOSADMIN_USER=nagiosadmin \ NAGIOSADMIN_PASS=nagios \ - NAGIOS_VERSION=4.5.5 \ + NAGIOS_VERSION=4.5.6 \ NAGIOS_PLUGINS_VERSION=2.4.12 \ NRPE_VERSION=4.1.1 \ APACHE_LOCK_DIR=/var/run \ @@ -204,7 +204,7 @@ LABEL name="Nagios" \ nrpeVersion=$NRPE_VERSION \ homepage="https://www.nagios.com/" \ maintainer="Christos Manios " \ - build="23" \ + build="24-snapshot" \ org.opencontainers.image.title="Nagios" \ org.opencontainers.image.description="Nagios, the Industry Standard In IT Infrastructure Monitoring" \ org.opencontainers.image.vendor="Nagios" \ @@ -213,7 +213,7 @@ LABEL name="Nagios" \ org.opencontainers.image.url="https://hub.docker.com/r/manios/nagios" \ org.opencontainers.image.source="https://github.com/manios/docker-nagios" \ org.opencontainers.image.documentation="https://github.com/manios/docker-nagios/blob/master/README.md" \ - org.opencontainers.image.version="23" + org.opencontainers.image.version="24-snapshot" RUN mkdir -p ${NAGIOS_HOME} && \ mkdir -p /orig/apache2 diff --git a/LICENCE b/LICENCE index b76b0a2..c364beb 100644 --- a/LICENCE +++ b/LICENCE @@ -1,6 +1,6 @@ MIT License -Copyright 2022 Christos Manios +Copyright 2024 Christos Manios Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -10,7 +10,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI MIT License -Copyright 2017 Jason Rivers +Copyright 2024 Jason Rivers Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: From 8045ac4399ce504600367ad6651aa36829cf8a83 Mon Sep 17 00:00:00 2001 From: Christos Manios Date: Fri, 11 Oct 2024 08:52:47 +0300 Subject: [PATCH 29/55] Release build 24 --- CHANGELOG.md | 2 +- Dockerfile | 4 ++-- README.md | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 426f8bb..cce8cac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ This Docker image contains more than one software (Nagios, Nagios plugins, NRPE, Apache HTTPD, etc.) with different versions. Hence we decided to name the releases with the naming `Build - ` which will have an incremental unsigned integer. In this document we will describe the contents of every image in every build. -## Build 24 (2024-10-10) +## Build 24 (2024-10-11) * Nagios core: v4.5.6 * Nagios plugins: v2.4.12 diff --git a/Dockerfile b/Dockerfile index 7bcc788..fef73c5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -204,7 +204,7 @@ LABEL name="Nagios" \ nrpeVersion=$NRPE_VERSION \ homepage="https://www.nagios.com/" \ maintainer="Christos Manios " \ - build="24-snapshot" \ + build="24" \ org.opencontainers.image.title="Nagios" \ org.opencontainers.image.description="Nagios, the Industry Standard In IT Infrastructure Monitoring" \ org.opencontainers.image.vendor="Nagios" \ @@ -213,7 +213,7 @@ LABEL name="Nagios" \ org.opencontainers.image.url="https://hub.docker.com/r/manios/nagios" \ org.opencontainers.image.source="https://github.com/manios/docker-nagios" \ org.opencontainers.image.documentation="https://github.com/manios/docker-nagios/blob/master/README.md" \ - org.opencontainers.image.version="24-snapshot" + org.opencontainers.image.version="24" RUN mkdir -p ${NAGIOS_HOME} && \ mkdir -p /orig/apache2 diff --git a/README.md b/README.md index 7dc243d..202c8cb 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Build Status: ## Supported tags and respective `Dockerfile` links -* `4.5.5`, `4.5`, `latest` [(4.5.5/Dockerfile)](https://github.com/manios/docker-nagios/blob/master/Dockerfile) +* `4.5.6`, `4.5`, `latest` [(4.5.6/Dockerfile)](https://github.com/manios/docker-nagios/blob/master/Dockerfile) For more information about the image versions you may refer to the [CHANGELOG](https://github.com/manios/docker-nagios/blob/master/CHANGELOG.md) From 47c30fc38d9bd06a5919b116271fafb885ff3646 Mon Sep 17 00:00:00 2001 From: Christos Manios Date: Sun, 27 Oct 2024 11:22:52 +0200 Subject: [PATCH 30/55] Upgrade to Nagios Core to 4.5.7 (#86) --- CHANGELOG.md | 10 ++++++++++ Dockerfile | 2 +- README.md | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cce8cac..85ad224 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,16 @@ This Docker image contains more than one software (Nagios, Nagios plugins, NRPE, Apache HTTPD, etc.) with different versions. Hence we decided to name the releases with the naming `Build - ` which will have an incremental unsigned integer. In this document we will describe the contents of every image in every build. +## Build 25 (2024-10-27) + +* Nagios core: v4.5.7 +* Nagios plugins: v2.4.12 +* NRPE: 4.1.1 + +### Features + +* Upgrade to Nagios Core `4.5.7`. ([#86](https://github.com/manios/docker-nagios/issues/86)) + ## Build 24 (2024-10-11) * Nagios core: v4.5.6 diff --git a/Dockerfile b/Dockerfile index fef73c5..2a083eb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,7 +18,7 @@ ENV NAGIOS_HOME=/opt/nagios \ NAGIOS_FQDN=nagios.example.com \ NAGIOSADMIN_USER=nagiosadmin \ NAGIOSADMIN_PASS=nagios \ - NAGIOS_VERSION=4.5.6 \ + NAGIOS_VERSION=4.5.7 \ NAGIOS_PLUGINS_VERSION=2.4.12 \ NRPE_VERSION=4.1.1 \ APACHE_LOCK_DIR=/var/run \ diff --git a/README.md b/README.md index 202c8cb..a17fd2a 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Build Status: ## Supported tags and respective `Dockerfile` links -* `4.5.6`, `4.5`, `latest` [(4.5.6/Dockerfile)](https://github.com/manios/docker-nagios/blob/master/Dockerfile) +* `4.5.7`, `4.5`, `latest` [(4.5.7/Dockerfile)](https://github.com/manios/docker-nagios/blob/master/Dockerfile) For more information about the image versions you may refer to the [CHANGELOG](https://github.com/manios/docker-nagios/blob/master/CHANGELOG.md) From 155722ddbda92faed376fcdafbe9c8ea4e6305ba Mon Sep 17 00:00:00 2001 From: Christos Manios Date: Mon, 18 Nov 2024 11:27:53 +0200 Subject: [PATCH 31/55] Upgrade to Nagios Core to 4.5.8 (#87) --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2a083eb..3adc06a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,7 +18,7 @@ ENV NAGIOS_HOME=/opt/nagios \ NAGIOS_FQDN=nagios.example.com \ NAGIOSADMIN_USER=nagiosadmin \ NAGIOSADMIN_PASS=nagios \ - NAGIOS_VERSION=4.5.7 \ + NAGIOS_VERSION=4.5.8 \ NAGIOS_PLUGINS_VERSION=2.4.12 \ NRPE_VERSION=4.1.1 \ APACHE_LOCK_DIR=/var/run \ @@ -204,7 +204,7 @@ LABEL name="Nagios" \ nrpeVersion=$NRPE_VERSION \ homepage="https://www.nagios.com/" \ maintainer="Christos Manios " \ - build="24" \ + build="26-snapshot" \ org.opencontainers.image.title="Nagios" \ org.opencontainers.image.description="Nagios, the Industry Standard In IT Infrastructure Monitoring" \ org.opencontainers.image.vendor="Nagios" \ @@ -213,7 +213,7 @@ LABEL name="Nagios" \ org.opencontainers.image.url="https://hub.docker.com/r/manios/nagios" \ org.opencontainers.image.source="https://github.com/manios/docker-nagios" \ org.opencontainers.image.documentation="https://github.com/manios/docker-nagios/blob/master/README.md" \ - org.opencontainers.image.version="24" + org.opencontainers.image.version="26-snapshot" RUN mkdir -p ${NAGIOS_HOME} && \ mkdir -p /orig/apache2 From 002dacf9653453fe0231ac7bf3c96928d7f07220 Mon Sep 17 00:00:00 2001 From: Christos Manios Date: Mon, 18 Nov 2024 11:28:58 +0200 Subject: [PATCH 32/55] Release build 26 - Remove MAINTAINER deprecated instruction --- CHANGELOG.md | 10 ++++++++++ Dockerfile | 5 ++--- README.md | 2 +- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 85ad224..5f83592 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,16 @@ This Docker image contains more than one software (Nagios, Nagios plugins, NRPE, Apache HTTPD, etc.) with different versions. Hence we decided to name the releases with the naming `Build - ` which will have an incremental unsigned integer. In this document we will describe the contents of every image in every build. +## Build 26 (2024-11-22) + +* Nagios core: v4.5.8 +* Nagios plugins: v2.4.12 +* NRPE: 4.1.1 + +### Features + +* Upgrade to Nagios Core `4.5.8`. ([#87](https://github.com/manios/docker-nagios/issues/87)) + ## Build 25 (2024-10-27) * Nagios core: v4.5.7 diff --git a/Dockerfile b/Dockerfile index 3adc06a..53d0c70 100644 --- a/Dockerfile +++ b/Dockerfile @@ -196,7 +196,6 @@ RUN mkdir -p /orig/apache2 && \ FROM builder-base -MAINTAINER Christos Manios LABEL name="Nagios" \ nagiosVersion=$NAGIOS_VERSION \ @@ -204,7 +203,7 @@ LABEL name="Nagios" \ nrpeVersion=$NRPE_VERSION \ homepage="https://www.nagios.com/" \ maintainer="Christos Manios " \ - build="26-snapshot" \ + build="26" \ org.opencontainers.image.title="Nagios" \ org.opencontainers.image.description="Nagios, the Industry Standard In IT Infrastructure Monitoring" \ org.opencontainers.image.vendor="Nagios" \ @@ -213,7 +212,7 @@ LABEL name="Nagios" \ org.opencontainers.image.url="https://hub.docker.com/r/manios/nagios" \ org.opencontainers.image.source="https://github.com/manios/docker-nagios" \ org.opencontainers.image.documentation="https://github.com/manios/docker-nagios/blob/master/README.md" \ - org.opencontainers.image.version="26-snapshot" + org.opencontainers.image.version="26" RUN mkdir -p ${NAGIOS_HOME} && \ mkdir -p /orig/apache2 diff --git a/README.md b/README.md index a17fd2a..b23d02c 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Build Status: ## Supported tags and respective `Dockerfile` links -* `4.5.7`, `4.5`, `latest` [(4.5.7/Dockerfile)](https://github.com/manios/docker-nagios/blob/master/Dockerfile) +* `4.5.8`, `4.5`, `latest` [(4.5.8/Dockerfile)](https://github.com/manios/docker-nagios/blob/master/Dockerfile) For more information about the image versions you may refer to the [CHANGELOG](https://github.com/manios/docker-nagios/blob/master/CHANGELOG.md) From 9c4873d9c1b4c8e6505f3a7882213edd5d0ef290 Mon Sep 17 00:00:00 2001 From: Christos Manios Date: Sun, 29 Dec 2024 10:51:21 +0200 Subject: [PATCH 33/55] Upgrade to Nagios Core to 4.5.9 (#88) --- Dockerfile | 6 +++--- overlay/usr/local/bin/start_nagios | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 53d0c70..76f0498 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,7 +18,7 @@ ENV NAGIOS_HOME=/opt/nagios \ NAGIOS_FQDN=nagios.example.com \ NAGIOSADMIN_USER=nagiosadmin \ NAGIOSADMIN_PASS=nagios \ - NAGIOS_VERSION=4.5.8 \ + NAGIOS_VERSION=4.5.9 \ NAGIOS_PLUGINS_VERSION=2.4.12 \ NRPE_VERSION=4.1.1 \ APACHE_LOCK_DIR=/var/run \ @@ -203,7 +203,7 @@ LABEL name="Nagios" \ nrpeVersion=$NRPE_VERSION \ homepage="https://www.nagios.com/" \ maintainer="Christos Manios " \ - build="26" \ + build="27" \ org.opencontainers.image.title="Nagios" \ org.opencontainers.image.description="Nagios, the Industry Standard In IT Infrastructure Monitoring" \ org.opencontainers.image.vendor="Nagios" \ @@ -212,7 +212,7 @@ LABEL name="Nagios" \ org.opencontainers.image.url="https://hub.docker.com/r/manios/nagios" \ org.opencontainers.image.source="https://github.com/manios/docker-nagios" \ org.opencontainers.image.documentation="https://github.com/manios/docker-nagios/blob/master/README.md" \ - org.opencontainers.image.version="26" + org.opencontainers.image.version="27" RUN mkdir -p ${NAGIOS_HOME} && \ mkdir -p /orig/apache2 diff --git a/overlay/usr/local/bin/start_nagios b/overlay/usr/local/bin/start_nagios index 751ed2c..e906cd5 100755 --- a/overlay/usr/local/bin/start_nagios +++ b/overlay/usr/local/bin/start_nagios @@ -18,7 +18,7 @@ fi if [ ! -f "${NAGIOS_HOME}/etc/htpasswd.users" ] ; then htpasswd -c -b -s "${NAGIOS_HOME}/etc/htpasswd.users" "${NAGIOSADMIN_USER}" "${NAGIOSADMIN_PASS}" - chown -R ${NAGIOS_USER}.${NAGIOS_GROUP} "${NAGIOS_HOME}/etc/htpasswd.users" + chown -R ${NAGIOS_USER}:${NAGIOS_GROUP} "${NAGIOS_HOME}/etc/htpasswd.users" fi # Set current $NAGIOSADMIN_USER to the configuration of $NAGIOS_HOME/etc/cgi.cfg From b6f28ebd98b94a196bb105c3707cdc3679221f39 Mon Sep 17 00:00:00 2001 From: Christos Manios Date: Sun, 29 Dec 2024 10:52:31 +0200 Subject: [PATCH 34/55] Release build 27 --- CHANGELOG.md | 10 ++++++++++ README.md | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f83592..ef127b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,16 @@ This Docker image contains more than one software (Nagios, Nagios plugins, NRPE, Apache HTTPD, etc.) with different versions. Hence we decided to name the releases with the naming `Build - ` which will have an incremental unsigned integer. In this document we will describe the contents of every image in every build. +## Build 27 (2024-12-29) + +* Nagios core: v4.5.9 +* Nagios plugins: v2.4.12 +* NRPE: 4.1.1 + +### Features + +* Upgrade to Nagios Core `4.5.9`. ([#88](https://github.com/manios/docker-nagios/issues/88)) + ## Build 26 (2024-11-22) * Nagios core: v4.5.8 diff --git a/README.md b/README.md index b23d02c..82e4ade 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Build Status: ## Supported tags and respective `Dockerfile` links -* `4.5.8`, `4.5`, `latest` [(4.5.8/Dockerfile)](https://github.com/manios/docker-nagios/blob/master/Dockerfile) +* `4.5.9`, `4.5`, `latest` [(4.5.9/Dockerfile)](https://github.com/manios/docker-nagios/blob/master/Dockerfile) For more information about the image versions you may refer to the [CHANGELOG](https://github.com/manios/docker-nagios/blob/master/CHANGELOG.md) From 3ed23b25ccdb46bbf387c4a7122e426f313496fb Mon Sep 17 00:00:00 2001 From: Christos Manios Date: Sat, 22 Feb 2025 13:20:00 +0200 Subject: [PATCH 35/55] Upgrade NRPE to 4.1.3 and gosu to v1.13 --- Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 76f0498..dedd33b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,7 +20,7 @@ ENV NAGIOS_HOME=/opt/nagios \ NAGIOSADMIN_PASS=nagios \ NAGIOS_VERSION=4.5.9 \ NAGIOS_PLUGINS_VERSION=2.4.12 \ - NRPE_VERSION=4.1.1 \ + NRPE_VERSION=4.1.3 \ APACHE_LOCK_DIR=/var/run \ APACHE_LOG_DIR=/var/log/apache2 @@ -48,7 +48,7 @@ RUN addgroup -S ${NAGIOS_GROUP} && \ echo "$TARGETPLATFORM" | awk '{ gosuBinArr["linux/386"]="gosu-i386"; gosuBinArr["linux/amd64"]="gosu-amd64"; gosuBinArr["linux/arm/v6"]="gosu-armel"; gosuBinArr["linux/arm/v7"]="gosu-armhf"; gosuBinArr["linux/arm64"]="gosu-arm64"; gosuBinArr["linux/arm64/v8"]="gosu-arm64"; print gosuBinArr[$0];}' > mygosuver.txt && \ gosuPlatform=$(cat mygosuver.txt) && \ echo "Downloading ${gosuPlatform} for platform $TARGETPLATFORM" &&\ - curl -L -o gosu "https://github.com/tianon/gosu/releases/download/1.13/${gosuPlatform}" && \ + curl -L -o gosu "https://github.com/tianon/gosu/releases/download/1.17/${gosuPlatform}" && \ mv gosu /bin/ && \ chmod 755 /bin/gosu && \ chmod +s /bin/gosu && \ @@ -203,7 +203,7 @@ LABEL name="Nagios" \ nrpeVersion=$NRPE_VERSION \ homepage="https://www.nagios.com/" \ maintainer="Christos Manios " \ - build="27" \ + build="28" \ org.opencontainers.image.title="Nagios" \ org.opencontainers.image.description="Nagios, the Industry Standard In IT Infrastructure Monitoring" \ org.opencontainers.image.vendor="Nagios" \ @@ -212,7 +212,7 @@ LABEL name="Nagios" \ org.opencontainers.image.url="https://hub.docker.com/r/manios/nagios" \ org.opencontainers.image.source="https://github.com/manios/docker-nagios" \ org.opencontainers.image.documentation="https://github.com/manios/docker-nagios/blob/master/README.md" \ - org.opencontainers.image.version="27" + org.opencontainers.image.version="28" RUN mkdir -p ${NAGIOS_HOME} && \ mkdir -p /orig/apache2 From 85434f57dccbd8815748b6da496b21c37a3ccc42 Mon Sep 17 00:00:00 2001 From: Christos Manios Date: Sat, 22 Feb 2025 13:20:09 +0200 Subject: [PATCH 36/55] Release build 28 --- CHANGELOG.md | 10 ++++++++++ README.md | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ef127b4..46bd785 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,16 @@ This Docker image contains more than one software (Nagios, Nagios plugins, NRPE, Apache HTTPD, etc.) with different versions. Hence we decided to name the releases with the naming `Build - ` which will have an incremental unsigned integer. In this document we will describe the contents of every image in every build. +## Build 28 (2025-02-22) + +* Nagios core: v4.5.9 +* Nagios plugins: v2.4.12 +* NRPE: 4.1.3 + +### Features + +* Upgrade NRPE to `4.1.3` and gosu to `v1.13`. ([#90](https://github.com/manios/docker-nagios/issues/90)) + ## Build 27 (2024-12-29) * Nagios core: v4.5.9 diff --git a/README.md b/README.md index 82e4ade..62f54b7 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Docker Nagios -Docker image for [Nagios](https://www.nagios.org/), the Industry Standard In IT Infrastructure Monitoring. Nagios Core is running on [Alpine Linux](https://alpinelinux.org/), using [Apache HTTP](http://httpd.apache.org/) as a web server and [sSMTP](https://wiki.debian.org/sSMTP) as mail agent for email notifications. +Docker image for [Nagios](https://www.nagios.org/), the Industry Standard in IT Infrastructure Monitoring. Nagios Core is running on [Alpine Linux](https://alpinelinux.org/), using [Apache HTTP](http://httpd.apache.org/) as a web server and [sSMTP](https://wiki.debian.org/sSMTP) as mail agent for email notifications. The image is inspired by [JasonRivers/Docker-Nagios](https://github.com/JasonRivers/Docker-Nagios) image (Kudos to Jason!) but follows a different approach targetted to lightweight size and basic features. From f8680f8e8d1d511428cdd023853aed8d3ea11351 Mon Sep 17 00:00:00 2001 From: Christos Manios Date: Sun, 23 Feb 2025 16:35:07 +0200 Subject: [PATCH 37/55] Do not use gosu in ping command anymore (#91) --- Dockerfile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index dedd33b..0ffd4c5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -51,7 +51,6 @@ RUN addgroup -S ${NAGIOS_GROUP} && \ curl -L -o gosu "https://github.com/tianon/gosu/releases/download/1.17/${gosuPlatform}" && \ mv gosu /bin/ && \ chmod 755 /bin/gosu && \ - chmod +s /bin/gosu && \ addgroup -S apache ${NAGIOS_CMDGROUP} @@ -125,9 +124,9 @@ RUN echo -e "\n\n ===========================\n Configure Nagios Plugins\n = --with-nagios-group=${NAGIOS_USER} \ --with-openssl \ --prefix=${NAGIOS_HOME} \ - --with-ping-command="/bin/gosu root /bin/ping -n -w %d -c %d %s" \ + --with-ping-command="/bin/ping -n -w %d -c %d %s" \ --with-ipv6 \ - --with-ping6-command="/bin/gosu root /bin/ping6 -n -w %d -c %d %s" && \ + --with-ping6-command="/bin/ping6 -n -w %d -c %d %s" && \ echo "Nagios plugins configured: OK" && \ echo -n "Replacing \"\" with \"\": " && \ egrep -rl "\" . | xargs sed -i 's///g' && \ From d3c5fa1a8a08f10961c9c8a5c73cfde34bddcc40 Mon Sep 17 00:00:00 2001 From: Christos Manios Date: Sun, 23 Feb 2025 16:37:01 +0200 Subject: [PATCH 38/55] Release build 29 --- CHANGELOG.md | 10 ++++++++++ Dockerfile | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 46bd785..33f5d12 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,16 @@ This Docker image contains more than one software (Nagios, Nagios plugins, NRPE, Apache HTTPD, etc.) with different versions. Hence we decided to name the releases with the naming `Build - ` which will have an incremental unsigned integer. In this document we will describe the contents of every image in every build. +## Build 29 (2025-02-23) + +* Nagios core: v4.5.9 +* Nagios plugins: v2.4.12 +* NRPE: 4.1.3 + +### Bug Fixes + +* Do not set the `setuid` field in [gosu](https://github.com/tianon/gosu) as it causes errors and `ping` command does not work. ([#91](https://github.com/manios/docker-nagios/issues/91)) + ## Build 28 (2025-02-22) * Nagios core: v4.5.9 diff --git a/Dockerfile b/Dockerfile index 0ffd4c5..0b6a9cd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -202,7 +202,7 @@ LABEL name="Nagios" \ nrpeVersion=$NRPE_VERSION \ homepage="https://www.nagios.com/" \ maintainer="Christos Manios " \ - build="28" \ + build="29" \ org.opencontainers.image.title="Nagios" \ org.opencontainers.image.description="Nagios, the Industry Standard In IT Infrastructure Monitoring" \ org.opencontainers.image.vendor="Nagios" \ @@ -211,7 +211,7 @@ LABEL name="Nagios" \ org.opencontainers.image.url="https://hub.docker.com/r/manios/nagios" \ org.opencontainers.image.source="https://github.com/manios/docker-nagios" \ org.opencontainers.image.documentation="https://github.com/manios/docker-nagios/blob/master/README.md" \ - org.opencontainers.image.version="28" + org.opencontainers.image.version="29" RUN mkdir -p ${NAGIOS_HOME} && \ mkdir -p /orig/apache2 From 79232ba6ae132c6adda056e8248d25367b52acc6 Mon Sep 17 00:00:00 2001 From: Christos Manios Date: Fri, 4 Apr 2025 14:37:12 +0300 Subject: [PATCH 39/55] Build with Alpine 3.21 except for linux/arm/v6,linux/arm/v7 which still uses Alpine 3.12 due to time_64 issue with musl libc (#92) --- .github/workflows/github-build.yml | 128 ++++++++++++-- Dockerfile | 14 +- alpine3-12.dockerfile | 257 +++++++++++++++++++++++++++++ 3 files changed, 381 insertions(+), 18 deletions(-) create mode 100644 alpine3-12.dockerfile diff --git a/.github/workflows/github-build.yml b/.github/workflows/github-build.yml index 5d5e7c4..a57007c 100644 --- a/.github/workflows/github-build.yml +++ b/.github/workflows/github-build.yml @@ -92,11 +92,22 @@ jobs: --progress plain \ --cache-from "type=local,src=/tmp/.buildx-cache" \ --cache-to "type=local,dest=/tmp/.buildx-cache" \ - --platform linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 \ + --platform linux/386,linux/amd64,linux/arm64 \ --label "gitCommit=${{ github.sha }}" \ --label "org.opencontainers.image.revision=${{ github.sha }}" \ - --tag ${GITHUB_ACTOR}/nagios:${{ env.action_mytag }} \ - --output "type=image,push=false" . + --tag ${GITHUB_ACTOR}/nagios:alpine-3-21-${{ env.action_mytag }} \ + --output "type=image,push=false" -f Dockerfile . + - name: Docker Buildx (build and cache) for linux/arm/v6,linux/arm/v7 (Alpine 3.12) + run: | + docker buildx build \ + --progress plain \ + --cache-from "type=local,src=/tmp/.buildx-cache" \ + --cache-to "type=local,dest=/tmp/.buildx-cache" \ + --platform linux/arm/v6,linux/arm/v7 \ + --label "gitCommit=${{ github.sha }}" \ + --label "org.opencontainers.image.revision=${{ github.sha }}" \ + --tag ${GITHUB_ACTOR}/nagios:alpine-3-12-${{ env.action_mytag }} \ + --output "type=image,push=false" -f alpine3-12.dockerfile . - name: 'Docker Buildx: Push to Dockerhub' run: | echo "== This branch is : ${GITHUB_REF}" @@ -104,23 +115,118 @@ jobs: docker buildx build \ --progress plain \ --cache-from "type=local,src=/tmp/.buildx-cache" \ - --platform linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 \ + --platform linux/386,linux/amd64,linux/arm64 \ --label "gitCommit=${{ github.sha }}" \ --label "org.opencontainers.image.revision=${{ github.sha }}" \ - --tag ${GITHUB_ACTOR}/nagios:${{ env.action_mytag }} \ - --output "type=image,push=true" . - - name: 'Docker Buildx: Push to GitHub Container Registry' + --tag ${GITHUB_ACTOR}/nagios:alpine-3-21-${{ env.action_mytag }} \ + --output "type=image,push=true" -f Dockerfile . + - name: 'Docker Buildx: Push to Dockerhub for linux/arm/v6,linux/arm/v7 (Alpine 3.12)' run: | echo "== This branch is : ${GITHUB_REF}" - echo "Will push image ghcr.io/${GITHUB_ACTOR}/nagios:${{ env.action_mytag }} to GitHub Container Registry" + echo "Will push image ${GITHUB_ACTOR}/nagios:${{ env.action_mytag }} to DockerHub" docker buildx build \ --progress plain \ --cache-from "type=local,src=/tmp/.buildx-cache" \ - --platform linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 \ + --platform linux/arm/v6,linux/arm/v7 \ --label "gitCommit=${{ github.sha }}" \ --label "org.opencontainers.image.revision=${{ github.sha }}" \ - --tag ghcr.io/${GITHUB_ACTOR}/nagios:${{ env.action_mytag }} \ - --output "type=image,push=true" . + --tag ${GITHUB_ACTOR}/nagios:alpine-3-12-${{ env.action_mytag }} \ + --output "type=image,push=true" -f alpine3-12.dockerfile . + - name: 'Docker Buildx: Push to GitHub Container Registry' + run: | + echo "== This branch is : ${GITHUB_REF}" + echo "Will push image ghcr.io/${GITHUB_ACTOR}/nagios:${{ env.action_mytag }} to DockerHub" + docker buildx build \ + --progress plain \ + --cache-from "type=local,src=/tmp/.buildx-cache" \ + --platform linux/386,linux/amd64,linux/arm64 \ + --label "gitCommit=${{ github.sha }}" \ + --label "org.opencontainers.image.revision=${{ github.sha }}" \ + --tag ghcr.io/${GITHUB_ACTOR}/nagios:alpine-3-21-${{ env.action_mytag }} \ + --output "type=image,push=true" -f Dockerfile . + - name: 'Docker Buildx: Push to GitHub Container Registry for linux/arm/v6,linux/arm/v7 (Alpine 3.12)' + run: | + echo "== This branch is : ${GITHUB_REF}" + echo "Will push image ghcr.io/${GITHUB_ACTOR}/nagios:${{ env.action_mytag }} to DockerHub" + docker buildx build \ + --progress plain \ + --cache-from "type=local,src=/tmp/.buildx-cache" \ + --platform linux/arm/v6,linux/arm/v7 \ + --label "gitCommit=${{ github.sha }}" \ + --label "org.opencontainers.image.revision=${{ github.sha }}" \ + --tag ghcr.io/${GITHUB_ACTOR}/nagios:alpine-3-12-${{ env.action_mytag }} \ + --output "type=image,push=true" -f alpine3-12.dockerfile . + - name: Download and configure jq + run: | + echo "Download jq" + wget https://github.com/jqlang/jq/releases/download/jq-1.7.1/jq-linux-amd64 + echo "Configure jq" + mv jq-linux-amd64 jq + chmod 744 jq + - name: Create a new unified manifest for Dockerhub + run: | + echo "Download manifest of ${GITHUB_ACTOR}/nagios:alpine-3-21-${{ env.action_mytag }}" + docker buildx imagetools inspect ${GITHUB_ACTOR}/nagios:alpine-3-21-${{ env.action_mytag }} --raw > manifest1.json + echo "Download manifest of ${GITHUB_ACTOR}/nagios:alpine-3-12-${{ env.action_mytag }}" + docker buildx imagetools inspect ${GITHUB_ACTOR}/nagios:alpine-3-12-${{ env.action_mytag }} --raw > manifest2.json + ls -l manifest*json + SHA256_AMD64=$(cat manifest1.json | ./jq -r '.manifests[]| select(.platform.architecture == "amd64") | .digest') + SHA256_ARM64=$(cat manifest1.json | ./jq -r '.manifests[]| select(.platform.architecture == "arm64") | .digest') + SHA256_I386=$(cat manifest1.json | ./jq -r '.manifests[]| select(.platform.architecture == "386") | .digest') + SHA256_ARMV6=$(cat manifest2.json | ./jq -r '.manifests[]| select(.platform.architecture == "arm") | select(.platform.variant == "v6") | .digest') + SHA256_ARMV7=$(cat manifest2.json | ./jq -r '.manifests[]| select(.platform.architecture == "arm") | select(.platform.variant == "v7") | .digest') + echo "Creating new manifest: ${GITHUB_ACTOR}/nagios:${{ env.action_mytag }}" + set -eux + docker manifest create --amend ${GITHUB_ACTOR}/nagios:${{ env.action_mytag }} \ + "${GITHUB_ACTOR}/nagios@${SHA256_AMD64}" \ + "${GITHUB_ACTOR}/nagios@${SHA256_ARM64}" \ + "${GITHUB_ACTOR}/nagios@${SHA256_I386}" \ + "${GITHUB_ACTOR}/nagios@${SHA256_ARMV6}" \ + "${GITHUB_ACTOR}/nagios@${SHA256_ARMV7}" + echo "Annotating new manifest: ${GITHUB_ACTOR}/nagios:${{ env.action_mytag }} with platforms and architectures" + docker manifest annotate ${GITHUB_ACTOR}/nagios:${{ env.action_mytag }} "${GITHUB_ACTOR}/nagios@${SHA256_AMD64}" --arch amd64 --os linux + docker manifest annotate ${GITHUB_ACTOR}/nagios:${{ env.action_mytag }} "${GITHUB_ACTOR}/nagios@${SHA256_ARM64}" --arch arm64 --os linux + docker manifest annotate ${GITHUB_ACTOR}/nagios:${{ env.action_mytag }} "${GITHUB_ACTOR}/nagios@${SHA256_I386}" --arch 386 --os linux + docker manifest annotate ${GITHUB_ACTOR}/nagios:${{ env.action_mytag }} "${GITHUB_ACTOR}/nagios@${SHA256_ARMV6}" --arch arm --os linux --variant v6 + docker manifest annotate ${GITHUB_ACTOR}/nagios:${{ env.action_mytag }} "${GITHUB_ACTOR}/nagios@${SHA256_ARMV7}" --arch arm --os linux --variant v7 + - name: Create a new unified manifest for GitHub Container Registry + run: | + echo "Download manifest of ghcr.io/${GITHUB_ACTOR}/nagios:alpine-3-21-${{ env.action_mytag }}" + docker buildx imagetools inspect ghcr.io/${GITHUB_ACTOR}/nagios:alpine-3-21-${{ env.action_mytag }} --raw > manifest1.json + echo "Download manifest of ghcr.io/${GITHUB_ACTOR}/nagios:alpine-3-12-${{ env.action_mytag }}" + docker buildx imagetools inspect ghcr.io/${GITHUB_ACTOR}/nagios:alpine-3-12-${{ env.action_mytag }} --raw > manifest2.json + ls -l manifest*json + SHA256_AMD64=$(cat manifest1.json | ./jq -r '.manifests[]| select(.platform.architecture == "amd64") | .digest') + SHA256_ARM64=$(cat manifest1.json | ./jq -r '.manifests[]| select(.platform.architecture == "arm64") | .digest') + SHA256_I386=$(cat manifest1.json | ./jq -r '.manifests[]| select(.platform.architecture == "386") | .digest') + SHA256_ARMV6=$(cat manifest2.json | ./jq -r '.manifests[]| select(.platform.architecture == "arm") | select(.platform.variant == "v6") | .digest') + SHA256_ARMV7=$(cat manifest2.json | ./jq -r '.manifests[]| select(.platform.architecture == "arm") | select(.platform.variant == "v7") | .digest') + echo "Creating new manifest: ghcr.io/${GITHUB_ACTOR}/nagios:${{ env.action_mytag }}" + set -eux + docker manifest create --amend ghcr.io/${GITHUB_ACTOR}/nagios:${{ env.action_mytag }} \ + ghcr.io/"${GITHUB_ACTOR}/nagios@${SHA256_AMD64}" \ + ghcr.io/"${GITHUB_ACTOR}/nagios@${SHA256_ARM64}" \ + ghcr.io/"${GITHUB_ACTOR}/nagios@${SHA256_I386}" \ + ghcr.io/"${GITHUB_ACTOR}/nagios@${SHA256_ARMV6}" \ + ghcr.io/"${GITHUB_ACTOR}/nagios@${SHA256_ARMV7}" + echo "Annotating new manifest: ghcr.io/${GITHUB_ACTOR}/nagios:${{ env.action_mytag }} with platforms and architectures" + docker manifest annotate ghcr.io/${GITHUB_ACTOR}/nagios:${{ env.action_mytag }} ghcr.io/"${GITHUB_ACTOR}/nagios@${SHA256_AMD64}" --arch amd64 --os linux + docker manifest annotate ghcr.io/${GITHUB_ACTOR}/nagios:${{ env.action_mytag }} ghcr.io/"${GITHUB_ACTOR}/nagios@${SHA256_ARM64}" --arch arm64 --os linux + docker manifest annotate ghcr.io/${GITHUB_ACTOR}/nagios:${{ env.action_mytag }} ghcr.io/"${GITHUB_ACTOR}/nagios@${SHA256_I386}" --arch 386 --os linux + docker manifest annotate ghcr.io/${GITHUB_ACTOR}/nagios:${{ env.action_mytag }} ghcr.io/"${GITHUB_ACTOR}/nagios@${SHA256_ARMV6}" --arch arm --os linux --variant v6 + docker manifest annotate ghcr.io/${GITHUB_ACTOR}/nagios:${{ env.action_mytag }} ghcr.io/"${GITHUB_ACTOR}/nagios@${SHA256_ARMV7}" --arch arm --os linux --variant v7 + - name: 'Push manifest to DockerHub' + run: | + echo "== This branch is : ${GITHUB_REF}" + echo "Will push image manifest ${GITHUB_ACTOR}/nagios:${{ env.action_mytag }} to DockerHub Registry" + docker manifest push ${GITHUB_ACTOR}/nagios:${{ env.action_mytag }} + - name: 'Push manifest to GitHub Container Registry' + run: | + echo "== This branch is : ${GITHUB_REF}" + echo "Will push image ghcr.io/${GITHUB_ACTOR}/nagios:${{ env.action_mytag }} to GitHub Container Registry" + docker manifest push ghcr.io/${GITHUB_ACTOR}/nagios:${{ env.action_mytag }} - name: Inspect image run: | docker buildx imagetools inspect ${GITHUB_ACTOR}/nagios:${{ env.action_mytag }} + docker buildx imagetools inspect ghcr.io/${GITHUB_ACTOR}/nagios:${{ env.action_mytag }} + diff --git a/Dockerfile b/Dockerfile index 0b6a9cd..89b4c8c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ # https://www.docker.com/blog/docker-arm-virtual-meetup-multi-arch-with-buildx/ -FROM alpine:3.12 as builder-base +FROM alpine:3.21 AS builder-base ARG TARGETPLATFORM ARG BUILDPLATFORM @@ -29,8 +29,8 @@ RUN addgroup -S ${NAGIOS_GROUP} && \ adduser -S ${NAGIOS_USER} -G ${NAGIOS_CMDGROUP} -g ${NAGIOS_USER} && \ apk update && \ apk add --no-cache git curl unzip apache2 apache2-utils rsyslog \ - php7 php7-gd php7-cli runit parallel ssmtp \ - libltdl libintl openssl-dev php7-apache2 procps tzdata \ + php83 php83-gd php83-cli runit parallel ssmtp \ + libltdl libintl openssl-dev php83-apache2 procps tzdata \ libldap mariadb-connector-c freeradius-client-dev libpq libdbi \ lm-sensors perl net-snmp-perl perl-net-snmp perl-crypt-x509 \ perl-timedate perl-libwww perl-text-glob samba-client openssh openssl \ @@ -58,7 +58,7 @@ RUN addgroup -S ${NAGIOS_GROUP} && \ ### STAGE 2 COMPILE NAGIOS SOURCES ### ### ================================== ### -FROM builder-base as builder-compile +FROM builder-base AS builder-compile ARG TARGETPLATFORM ARG BUILDPLATFORM @@ -67,7 +67,7 @@ RUN apk update && \ apk add --no-cache build-base automake libtool autoconf py-docutils gnutls \ gnutls-dev g++ make alpine-sdk build-base gcc autoconf \ gettext-dev linux-headers openssl-dev net-snmp net-snmp-tools \ - libcrypto1.1 libpq musl libldap libssl1.1 libdbi freeradius-client mariadb-connector-c \ + libcrypto3 libpq musl libldap libssl3 libdbi freeradius-client mariadb-connector-c \ openssh-client bind-tools samba-client fping grep rpcbind \ lm-sensors net-snmp-tools \ file freeradius-client-dev libdbi-dev libpq linux-headers mariadb-dev \ @@ -202,7 +202,7 @@ LABEL name="Nagios" \ nrpeVersion=$NRPE_VERSION \ homepage="https://www.nagios.com/" \ maintainer="Christos Manios " \ - build="29" \ + build="30" \ org.opencontainers.image.title="Nagios" \ org.opencontainers.image.description="Nagios, the Industry Standard In IT Infrastructure Monitoring" \ org.opencontainers.image.vendor="Nagios" \ @@ -211,7 +211,7 @@ LABEL name="Nagios" \ org.opencontainers.image.url="https://hub.docker.com/r/manios/nagios" \ org.opencontainers.image.source="https://github.com/manios/docker-nagios" \ org.opencontainers.image.documentation="https://github.com/manios/docker-nagios/blob/master/README.md" \ - org.opencontainers.image.version="29" + org.opencontainers.image.version="30" RUN mkdir -p ${NAGIOS_HOME} && \ mkdir -p /orig/apache2 diff --git a/alpine3-12.dockerfile b/alpine3-12.dockerfile new file mode 100644 index 0000000..12d4228 --- /dev/null +++ b/alpine3-12.dockerfile @@ -0,0 +1,257 @@ +### ================================== ### +### STAGE 1 CREATE PARENT IMAGE ### +### ================================== ### + +# https://www.docker.com/blog/docker-arm-virtual-meetup-multi-arch-with-buildx/ + +FROM alpine:3.12 AS builder-base + +ARG TARGETPLATFORM +ARG BUILDPLATFORM + +ENV NAGIOS_HOME=/opt/nagios \ + NAGIOS_USER=nagios \ + NAGIOS_GROUP=nagios \ + NAGIOS_CMDUSER=nagios \ + NAGIOS_CMDGROUP=nagios \ + NAGIOS_TIMEZONE=UTC \ + NAGIOS_FQDN=nagios.example.com \ + NAGIOSADMIN_USER=nagiosadmin \ + NAGIOSADMIN_PASS=nagios \ + NAGIOS_VERSION=4.5.9 \ + NAGIOS_PLUGINS_VERSION=2.4.12 \ + NRPE_VERSION=4.1.3 \ + APACHE_LOCK_DIR=/var/run \ + APACHE_LOG_DIR=/var/log/apache2 + + +RUN addgroup -S ${NAGIOS_GROUP} && \ + adduser -S ${NAGIOS_USER} -G ${NAGIOS_CMDGROUP} -g ${NAGIOS_USER} && \ + apk update && \ + apk add --no-cache git curl unzip apache2 apache2-utils rsyslog \ + php7 php7-gd php7-cli runit parallel ssmtp \ + libltdl libintl openssl-dev php7-apache2 procps tzdata \ + libldap mariadb-connector-c freeradius-client-dev libpq libdbi \ + lm-sensors perl net-snmp-perl perl-net-snmp perl-crypt-x509 \ + perl-timedate perl-libwww perl-text-glob samba-client openssh openssl \ + net-snmp-tools bind-tools gd gd-dev && \ + \ + : '# For x86 the binary is : gosu-i386' && \ + : '# For x64 the binary is : gosu-amd64' && \ + : '# For arm-v6 the binary is : gosu-armel' && \ + : '# For arm-v7 the binary is : gosu-armhf' && \ + : '# For arm64 the binary is : gosu-arm64' && \ + : '# For arm64/v8 the binary is : gosu-arm64' && \ + : '#######################################' && \ + : '# Creating an associative array with the platforms and their respective gosu release DOES NOT WORK in /bin/sh' && \ + echo "Arguments TARGETPLATFORM: ${TARGETPLATFORM} and BUILDPLATFORM: ${BUILDPLATFORM}" && \ + echo "$TARGETPLATFORM" | awk '{ gosuBinArr["linux/386"]="gosu-i386"; gosuBinArr["linux/amd64"]="gosu-amd64"; gosuBinArr["linux/arm/v6"]="gosu-armel"; gosuBinArr["linux/arm/v7"]="gosu-armhf"; gosuBinArr["linux/arm64"]="gosu-arm64"; gosuBinArr["linux/arm64/v8"]="gosu-arm64"; print gosuBinArr[$0];}' > mygosuver.txt && \ + gosuPlatform=$(cat mygosuver.txt) && \ + echo "Downloading ${gosuPlatform} for platform $TARGETPLATFORM" &&\ + curl -L -o gosu "https://github.com/tianon/gosu/releases/download/1.17/${gosuPlatform}" && \ + mv gosu /bin/ && \ + chmod 755 /bin/gosu && \ + addgroup -S apache ${NAGIOS_CMDGROUP} + + +### ================================== ### +### STAGE 2 COMPILE NAGIOS SOURCES ### +### ================================== ### + +FROM builder-base AS builder-compile +ARG TARGETPLATFORM +ARG BUILDPLATFORM + +# Add dependencies required to build Nagios +RUN apk update && \ + apk add --no-cache build-base automake libtool autoconf py-docutils gnutls \ + gnutls-dev g++ make alpine-sdk build-base gcc autoconf \ + gettext-dev linux-headers openssl-dev net-snmp net-snmp-tools \ + libcrypto1.1 libpq musl libldap libssl1.1 libdbi freeradius-client mariadb-connector-c \ + openssh-client bind-tools samba-client fping grep rpcbind \ + lm-sensors net-snmp-tools \ + file freeradius-client-dev libdbi-dev libpq linux-headers mariadb-dev \ + mariadb-connector-c-dev perl \ + net-snmp-dev openldap-dev openssl-dev postgresql-dev wget + +# Download Nagios core, plugins and nrpe sources +RUN cd /tmp && \ + echo -n "Downloading Nagios ${NAGIOS_VERSION} source code: " && \ + wget -O nagios-core.tar.gz "https://github.com/NagiosEnterprises/nagioscore/archive/refs/tags/nagios-${NAGIOS_VERSION}.tar.gz" && \ + echo -n -e "OK\nDownloading Nagios plugins ${NAGIOS_PLUGINS_VERSION} source code: " && \ + wget -O nagios-plugins.tar.gz "https://github.com/nagios-plugins/nagios-plugins/archive/refs/tags/release-${NAGIOS_PLUGINS_VERSION}.tar.gz" && \ + echo -n -e "OK\nDownloading NRPE ${NRPE_VERSION} source code: " && \ + wget -O nrpe.tar.gz "https://github.com/NagiosEnterprises/nrpe/archive/refs/tags/nrpe-${NRPE_VERSION}.tar.gz" && \ + env && \ + echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM !! == " && \ + echo "OK" + +# Compile Nagios Core +RUN ls -l /tmp && cd /tmp && \ + tar zxf nagios-core.tar.gz && \ + tar zxf nagios-plugins.tar.gz && \ + tar zxf nrpe.tar.gz && \ + cd "/tmp/nagioscore-nagios-${NAGIOS_VERSION}" && \ + echo -e "\n ===========================\n Configure Nagios Core\n ===========================\n" && \ + ./configure \ + --prefix=${NAGIOS_HOME} \ + --exec-prefix=${NAGIOS_HOME} \ + --enable-event-broker \ + --with-command-user=${NAGIOS_CMDUSER} \ + --with-command-group=${NAGIOS_CMDGROUP} \ + --with-nagios-user=${NAGIOS_USER} \ + --with-nagios-group=${NAGIOS_GROUP} && \ + : 'Apply patches to Nagios Core sources:' && \ + echo -n "Replacing \"\" with \"\": " && \ + sed -i 's///g' ./include/config.h && \ + echo "OK" && \ + echo -e "\n\n ===========================\n Compile Nagios Core\n ===========================\n" && \ + make all && \ + echo -e "\n\n ===========================\n Install Nagios Core\n ===========================\n" && \ + make install && \ + make install-commandmode && \ + make install-config && \ + make install-webconf && \ + echo -n "Nagios installed size: " && \ + du -h -s ${NAGIOS_HOME} + +# Compile Nagios Plugins +RUN echo -e "\n\n ===========================\n Configure Nagios Plugins\n ===========================\n" && \ + ls -lia /tmp && cd /tmp && \ + cd /tmp/nagios-plugins-release-${NAGIOS_PLUGINS_VERSION} && \ + ./autogen.sh && \ + ./configure --with-nagios-user=${NAGIOS_USER} \ + --with-nagios-group=${NAGIOS_USER} \ + --with-openssl \ + --prefix=${NAGIOS_HOME} \ + --with-ping-command="/bin/ping -n -w %d -c %d %s" \ + --with-ipv6 \ + --with-ping6-command="/bin/ping6 -n -w %d -c %d %s" && \ + echo "Nagios plugins configured: OK" && \ + echo -n "Replacing \"\" with \"\": " && \ + egrep -rl "\" . | xargs sed -i 's///g' && \ + egrep -rl "\"sys\/poll.h\"" . | xargs sed -i 's/"sys\/poll.h"/"poll.h"/g' && \ + echo "OK" && \ + echo -e "\n\n ===========================\n Compile Nagios Plugins\n ===========================\n" && \ + make && \ + echo "Nagios plugins compile successfully: OK" && \ + echo -e "\n\n ===========================\nInstall Nagios Plugins\n ===========================\n" && \ + make install && \ + echo "Nagios plugins installed successfully: OK" + +# Compile NRPE +RUN echo -e "\n\n =====================\n Configure NRPE\n =====================\n" && \ + cd /tmp/nrpe-nrpe-${NRPE_VERSION} && \ + ./configure --enable-command-args \ + --with-nagios-user=${NAGIOS_USER} \ + --with-nagios-group=${NAGIOS_USER} \ + --with-ssl=/usr/bin/openssl \ + --with-ssl-lib=/usr/lib && \ + echo "NRPE client configured: OK" && \ + echo -e "\n\n ===========================\n Compile NRPE\n ===========================\n" && \ + # make all && \ + make check_nrpe && \ + echo "NRPE compiled successfully: OK" && \ + echo -e "\n\n ===========================\n Install NRPE\n ===========================\n" && \ + # make install && \ + cp src/check_nrpe ${NAGIOS_HOME}/libexec/ && \ + echo "NRPE installed successfully: OK" && \ + echo -n "Final Nagios installed size: " && \ + du -h -s ${NAGIOS_HOME} + +# Compile Nagios files +# Create SSMTP configuration + + +# RUN sed -i.bak 's/.*\=www\-data//g' /etc/apache2/envvars +RUN export DOC_ROOT="DocumentRoot $(echo $NAGIOS_HOME/share)" && \ + sed -i "s,DocumentRoot.*,$DOC_ROOT," /etc/apache2/httpd.conf && \ + sed -i "s|^ *ScriptAlias.*$|ScriptAlias /cgi-bin $NAGIOS_HOME/sbin|g" /etc/apache2/httpd.conf && \ + sed -i 's/^\(.*\)#\(LoadModule cgi_module\)\(.*\)/\1\2\3/' /etc/apache2/httpd.conf && \ + echo "ServerName ${NAGIOS_FQDN}" >> /etc/apache2/httpd.conf + +RUN sed -i 's,/bin/mail,/usr/bin/mail,' ${NAGIOS_HOME}/etc/objects/commands.cfg && \ + sed -i 's,/usr/usr,/usr,' ${NAGIOS_HOME}/etc/objects/commands.cfg && \ + \ + : '# Modify Nagios mail commands in order to work with SSMTP' && \ + sed -i 's/^.*command_line.*Host Alert.*$//g' /opt/nagios/etc/objects/commands.cfg && \ + sed -i 's/^.*command_line.*Service Alert.*$//g' /opt/nagios/etc/objects/commands.cfg && \ + sed -i '/notify-host-by-email/a command_line /usr/bin/printf "%b" "Subject: $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$\\n\\n***** Nagios *****\\n\\nNotification Type: $NOTIFICATIONTYPE$\\nHost: $HOSTNAME$\\nState: $HOSTSTATE$\\nAddress: $HOSTADDRESS$\\nInfo: $HOSTOUTPUT$\\n\\nDate/Time: $LONGDATETIME$\\n" | /usr/sbin/sendmail -v $CONTACTEMAIL$' ${NAGIOS_HOME}/etc/objects/commands.cfg && \ + sed -i '/notify-service-by-email/a command_line /usr/bin/printf "%b" "Subject: $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$\\n\\n***** Nagios *****\\n\\nNotification Type: $NOTIFICATIONTYPE$\\n\\nService: $SERVICEDESC$\\nHost: $HOSTALIAS$\\nAddress: $HOSTADDRESS$\\nState: $SERVICESTATE$\\n\\nDate/Time: $LONGDATETIME$\\n\\nAdditional Info:\\n\\n$SERVICEOUTPUT$\\n" | /usr/sbin/sendmail -v $CONTACTEMAIL$' ${NAGIOS_HOME}/etc/objects/commands.cfg + +RUN echo "use_timezone=${NAGIOS_TIMEZONE}" >> ${NAGIOS_HOME}/etc/nagios.cfg && \ + sed -i 's/date_format=us/date_format=iso8601/g' ${NAGIOS_HOME}/etc/nagios.cfg + +# Copy original configuration to /orig directory +RUN mkdir -p /orig/apache2 && \ + cp -r /etc/apache2/* /orig/apache2 && \ + cp -r ${NAGIOS_HOME}/etc /orig/etc && \ + cp -r ${NAGIOS_HOME}/var /orig/var + + +### ========================== ### +### START OF ACTUAL DOCKERFILE ### +### ========================== ### + +FROM builder-base + + +LABEL name="Nagios" \ + nagiosVersion=$NAGIOS_VERSION \ + nagiosPluginsVersion=$NAGIOS_PLUGINS_VERSION \ + nrpeVersion=$NRPE_VERSION \ + homepage="https://www.nagios.com/" \ + maintainer="Christos Manios " \ + build="30" \ + org.opencontainers.image.title="Nagios" \ + org.opencontainers.image.description="Nagios, the Industry Standard In IT Infrastructure Monitoring" \ + org.opencontainers.image.vendor="Nagios" \ + org.opencontainers.image.authors="Christos Manios " \ + org.opencontainers.image.licenses="MIT" \ + org.opencontainers.image.url="https://hub.docker.com/r/manios/nagios" \ + org.opencontainers.image.source="https://github.com/manios/docker-nagios" \ + org.opencontainers.image.documentation="https://github.com/manios/docker-nagios/blob/master/README.md" \ + org.opencontainers.image.version="30" + +RUN mkdir -p ${NAGIOS_HOME} && \ + mkdir -p /orig/apache2 + +WORKDIR ${NAGIOS_HOME} +COPY --from=builder-compile ${NAGIOS_HOME} ${NAGIOS_HOME} + +COPY --from=builder-compile /orig /orig + +ADD overlay/ / + +# Make +RUN chmod +x /usr/local/bin/start_nagios \ + /etc/sv/apache/run \ + /etc/sv/nagios/run \ + /etc/sv/rsyslog/run && \ + rm -rf /etc/sv/getty-5 && \ + \ + : '# enable all runit services' && \ + ln -s /etc/sv/* /etc/service && \ + \ + : '# Copy initial settings files' && \ + chown -R nagios:nagios ${NAGIOS_HOME} && \ + : '# Create special dirs' && \ + (mkdir /run/apache2 || true) && \ + mkdir -p /var/spool/rsyslog && \ + : '# Copy Apache configuration' && \ + cp -Rp /orig/apache2/* /etc/apache2 && \ + : '# Convert files to Unix format' && \ + dos2unix /etc/rsyslog.conf && \ + dos2unix /usr/local/bin/start_nagios && \ + dos2unix /etc/sv/**/run && \ + dos2unix /etc/ssmtp/ssmtp.conf && \ + : '# Add mail symbolic links to ssmtp' && \ + ln -s $(which ssmtp) /bin/mail && \ + ln -s $(which ssmtp) /usr/sbin/mail + + +EXPOSE 80 + +VOLUME "${NAGIOS_HOME}/var" "${NAGIOS_HOME}/etc" "/var/log/apache2" "/opt/Custom-Nagios-Plugins" + +CMD [ "/usr/local/bin/start_nagios" ] From f86d932bb4a1f9ca91861430b9beea443b9db6a6 Mon Sep 17 00:00:00 2001 From: Christos Manios Date: Wed, 9 Apr 2025 21:23:07 +0300 Subject: [PATCH 40/55] Release build 30 --- CHANGELOG.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 33f5d12..297428f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,11 +3,26 @@ This Docker image contains more than one software (Nagios, Nagios plugins, NRPE, Apache HTTPD, etc.) with different versions. Hence we decided to name the releases with the naming `Build - ` which will have an incremental unsigned integer. In this document we will describe the contents of every image in every build. +## Build 30 (2025-04-10) + +* Nagios core: v4.5.9 +* Nagios plugins: v2.4.12 +* NRPE: 4.1.3 +* Alpine: + * 3.21.3: `amd64`, `i386`, `arm64` + * 3.12.12: `arm/v6`, `arm/v7` + +### Features + +* Use Alpine 3.21 as base image for `amd64`, `i386`, `arm64`. Until [nagioscore #1025](https://github.com/NagiosEnterprises/nagioscore/issues/1025) is fixed, we are going to use 3.12 as base image for `arm/v6` and `arm/v7`. ([#92](https://github.com/manios/docker-nagios/issues/92)) + ## Build 29 (2025-02-23) * Nagios core: v4.5.9 * Nagios plugins: v2.4.12 * NRPE: 4.1.3 +* Alpine: + * 3.12.12: `amd64`, `i386`, `arm64`, `arm/v6`, `arm/v7` ### Bug Fixes @@ -18,6 +33,8 @@ This Docker image contains more than one software (Nagios, Nagios plugins, NRPE, * Nagios core: v4.5.9 * Nagios plugins: v2.4.12 * NRPE: 4.1.3 +* Alpine: + * 3.12.12: `amd64`, `i386`, `arm64`, `arm/v6`, `arm/v7` ### Features @@ -28,6 +45,8 @@ This Docker image contains more than one software (Nagios, Nagios plugins, NRPE, * Nagios core: v4.5.9 * Nagios plugins: v2.4.12 * NRPE: 4.1.1 +* Alpine: + * 3.12.12: `amd64`, `i386`, `arm64`, `arm/v6`, `arm/v7` ### Features @@ -38,6 +57,8 @@ This Docker image contains more than one software (Nagios, Nagios plugins, NRPE, * Nagios core: v4.5.8 * Nagios plugins: v2.4.12 * NRPE: 4.1.1 +* Alpine: + * 3.12.12: `amd64`, `i386`, `arm64`, `arm/v6`, `arm/v7` ### Features From d098e3782afb651b18730a28ddbcbf982c65bd41 Mon Sep 17 00:00:00 2001 From: Christos Manios Date: Wed, 15 Oct 2025 13:58:51 +0300 Subject: [PATCH 41/55] Upgrade to Nagios Core to 4.5.10 (#95) --- Dockerfile | 12 ++++++------ alpine3-12.dockerfile | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 89b4c8c..7eeef8b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ # https://www.docker.com/blog/docker-arm-virtual-meetup-multi-arch-with-buildx/ -FROM alpine:3.21 AS builder-base +FROM alpine:3.22 AS builder-base ARG TARGETPLATFORM ARG BUILDPLATFORM @@ -18,7 +18,7 @@ ENV NAGIOS_HOME=/opt/nagios \ NAGIOS_FQDN=nagios.example.com \ NAGIOSADMIN_USER=nagiosadmin \ NAGIOSADMIN_PASS=nagios \ - NAGIOS_VERSION=4.5.9 \ + NAGIOS_VERSION=4.5.10 \ NAGIOS_PLUGINS_VERSION=2.4.12 \ NRPE_VERSION=4.1.3 \ APACHE_LOCK_DIR=/var/run \ @@ -34,7 +34,7 @@ RUN addgroup -S ${NAGIOS_GROUP} && \ libldap mariadb-connector-c freeradius-client-dev libpq libdbi \ lm-sensors perl net-snmp-perl perl-net-snmp perl-crypt-x509 \ perl-timedate perl-libwww perl-text-glob samba-client openssh openssl \ - net-snmp-tools bind-tools gd gd-dev && \ + net-snmp-tools bind-tools gd gd-dev bash && \ \ : '# For x86 the binary is : gosu-i386' && \ : '# For x64 the binary is : gosu-amd64' && \ @@ -48,7 +48,7 @@ RUN addgroup -S ${NAGIOS_GROUP} && \ echo "$TARGETPLATFORM" | awk '{ gosuBinArr["linux/386"]="gosu-i386"; gosuBinArr["linux/amd64"]="gosu-amd64"; gosuBinArr["linux/arm/v6"]="gosu-armel"; gosuBinArr["linux/arm/v7"]="gosu-armhf"; gosuBinArr["linux/arm64"]="gosu-arm64"; gosuBinArr["linux/arm64/v8"]="gosu-arm64"; print gosuBinArr[$0];}' > mygosuver.txt && \ gosuPlatform=$(cat mygosuver.txt) && \ echo "Downloading ${gosuPlatform} for platform $TARGETPLATFORM" &&\ - curl -L -o gosu "https://github.com/tianon/gosu/releases/download/1.17/${gosuPlatform}" && \ + curl -L -o gosu "https://github.com/tianon/gosu/releases/download/1.19/${gosuPlatform}" && \ mv gosu /bin/ && \ chmod 755 /bin/gosu && \ addgroup -S apache ${NAGIOS_CMDGROUP} @@ -202,7 +202,7 @@ LABEL name="Nagios" \ nrpeVersion=$NRPE_VERSION \ homepage="https://www.nagios.com/" \ maintainer="Christos Manios " \ - build="30" \ + build="31-snapshot" \ org.opencontainers.image.title="Nagios" \ org.opencontainers.image.description="Nagios, the Industry Standard In IT Infrastructure Monitoring" \ org.opencontainers.image.vendor="Nagios" \ @@ -211,7 +211,7 @@ LABEL name="Nagios" \ org.opencontainers.image.url="https://hub.docker.com/r/manios/nagios" \ org.opencontainers.image.source="https://github.com/manios/docker-nagios" \ org.opencontainers.image.documentation="https://github.com/manios/docker-nagios/blob/master/README.md" \ - org.opencontainers.image.version="30" + org.opencontainers.image.version="31-snapshot" RUN mkdir -p ${NAGIOS_HOME} && \ mkdir -p /orig/apache2 diff --git a/alpine3-12.dockerfile b/alpine3-12.dockerfile index 12d4228..e21f425 100644 --- a/alpine3-12.dockerfile +++ b/alpine3-12.dockerfile @@ -18,7 +18,7 @@ ENV NAGIOS_HOME=/opt/nagios \ NAGIOS_FQDN=nagios.example.com \ NAGIOSADMIN_USER=nagiosadmin \ NAGIOSADMIN_PASS=nagios \ - NAGIOS_VERSION=4.5.9 \ + NAGIOS_VERSION=4.5.10 \ NAGIOS_PLUGINS_VERSION=2.4.12 \ NRPE_VERSION=4.1.3 \ APACHE_LOCK_DIR=/var/run \ @@ -34,7 +34,7 @@ RUN addgroup -S ${NAGIOS_GROUP} && \ libldap mariadb-connector-c freeradius-client-dev libpq libdbi \ lm-sensors perl net-snmp-perl perl-net-snmp perl-crypt-x509 \ perl-timedate perl-libwww perl-text-glob samba-client openssh openssl \ - net-snmp-tools bind-tools gd gd-dev && \ + net-snmp-tools bind-tools gd gd-dev bash && \ \ : '# For x86 the binary is : gosu-i386' && \ : '# For x64 the binary is : gosu-amd64' && \ @@ -202,7 +202,7 @@ LABEL name="Nagios" \ nrpeVersion=$NRPE_VERSION \ homepage="https://www.nagios.com/" \ maintainer="Christos Manios " \ - build="30" \ + build="31-snapshot" \ org.opencontainers.image.title="Nagios" \ org.opencontainers.image.description="Nagios, the Industry Standard In IT Infrastructure Monitoring" \ org.opencontainers.image.vendor="Nagios" \ @@ -211,7 +211,7 @@ LABEL name="Nagios" \ org.opencontainers.image.url="https://hub.docker.com/r/manios/nagios" \ org.opencontainers.image.source="https://github.com/manios/docker-nagios" \ org.opencontainers.image.documentation="https://github.com/manios/docker-nagios/blob/master/README.md" \ - org.opencontainers.image.version="30" + org.opencontainers.image.version="31-snapshot" RUN mkdir -p ${NAGIOS_HOME} && \ mkdir -p /orig/apache2 From a98132f871fb1d385ae077b543b448cff7a5d9c4 Mon Sep 17 00:00:00 2001 From: Christos Manios Date: Sun, 1 Sep 2024 14:24:25 +0300 Subject: [PATCH 42/55] Add capability to use init scripts. (#96) --- Dockerfile | 6 +- README.md | 25 +++++ alpine3-12.dockerfile | 6 +- overlay/usr/local/bin/start_nagios | 142 +++++++++++++++++++++++------ 4 files changed, 147 insertions(+), 32 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7eeef8b..a2f62b4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -177,7 +177,11 @@ RUN sed -i 's,/bin/mail,/usr/bin/mail,' ${NAGIOS_HOME}/etc/objects/commands.cfg sed -i 's/^.*command_line.*Host Alert.*$//g' /opt/nagios/etc/objects/commands.cfg && \ sed -i 's/^.*command_line.*Service Alert.*$//g' /opt/nagios/etc/objects/commands.cfg && \ sed -i '/notify-host-by-email/a command_line /usr/bin/printf "%b" "Subject: $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$\\n\\n***** Nagios *****\\n\\nNotification Type: $NOTIFICATIONTYPE$\\nHost: $HOSTNAME$\\nState: $HOSTSTATE$\\nAddress: $HOSTADDRESS$\\nInfo: $HOSTOUTPUT$\\n\\nDate/Time: $LONGDATETIME$\\n" | /usr/sbin/sendmail -v $CONTACTEMAIL$' ${NAGIOS_HOME}/etc/objects/commands.cfg && \ - sed -i '/notify-service-by-email/a command_line /usr/bin/printf "%b" "Subject: $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$\\n\\n***** Nagios *****\\n\\nNotification Type: $NOTIFICATIONTYPE$\\n\\nService: $SERVICEDESC$\\nHost: $HOSTALIAS$\\nAddress: $HOSTADDRESS$\\nState: $SERVICESTATE$\\n\\nDate/Time: $LONGDATETIME$\\n\\nAdditional Info:\\n\\n$SERVICEOUTPUT$\\n" | /usr/sbin/sendmail -v $CONTACTEMAIL$' ${NAGIOS_HOME}/etc/objects/commands.cfg + sed -i '/notify-service-by-email/a command_line /usr/bin/printf "%b" "Subject: $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$\\n\\n***** Nagios *****\\n\\nNotification Type: $NOTIFICATIONTYPE$\\n\\nService: $SERVICEDESC$\\nHost: $HOSTALIAS$\\nAddress: $HOSTADDRESS$\\nState: $SERVICESTATE$\\n\\nDate/Time: $LONGDATETIME$\\n\\nAdditional Info:\\n\\n$SERVICEOUTPUT$\\n" | /usr/sbin/sendmail -v $CONTACTEMAIL$' ${NAGIOS_HOME}/etc/objects/commands.cfg && \ + \ + : '# Modify etc/resource.cfg in order to include custom plugins directory' && \ + sed -i 's/^\(.*\)\(Sets .USER2. to be the path to\) event handlers.*$/\1\2 custom plugins directory/g' "${NAGIOS_HOME}"/etc/resource.cfg && \ + sed -i 's;^#\([$]USER2[$]=\).*$;\1/opt/Custom-Nagios-Plugins;g' "${NAGIOS_HOME}"/etc/resource.cfg RUN echo "use_timezone=${NAGIOS_TIMEZONE}" >> ${NAGIOS_HOME}/etc/nagios.cfg && \ sed -i 's/date_format=us/date_format=iso8601/g' ${NAGIOS_HOME}/etc/nagios.cfg diff --git a/README.md b/README.md index 62f54b7..20cbc39 100644 --- a/README.md +++ b/README.md @@ -73,6 +73,31 @@ docker run -e "TZ=Europe/Athens" manios/nagios:latest This will configure and use globally `"Europe/Athens"` in both container and Nagios process. +### Init scripts + +Since tag `build-31` the docker image is able to run custom init scripts at the first time the container runs. This is useful if you want to install extra software and plugins, customise the container or execute any initialisation script of your choice. + +This feature has the following characteristics in detail: + +* You can run one or more init scripts which have to be present in the `/container-entrypoint-init-scripts` container directory. +* The custom init script(s) run to completion at the first container run. +* Nagios process starts after all init scripts complete successfully. +* If any init script throws an error, the container is restarted. +* When all init scripts run to completion (exit code 0), a special file is written to the container filesystem, in the path `${NAGIOS_HOME}/container_first_run`. This file acts as a flag which verifies that the init scripts will be executed only on the first run. +* If you want your init scripts to run in a specific order, then make sure to name them by using a numeric prefix such as: + 1. `0001-install-mongodb.sh` + 1. `0002-install-jq.sh` + 1. `0003-configure-custom-plugins.sh` + +You can also use a volume mount for your init scripts which can survive container deletions: + +```sh +docker run -d --name nagios \ + -p 8080:80 \ + -v "$(pwd)/customscripts:/container-entrypoint-init-scripts" \ + manios/nagios:latest +``` + ## Flavours This Docker image is designed with optimising resources usage in mind and is build for multiple hardware architectures. The following matrix can be used to determine if your hardware architecture is represented in a docker image tag: diff --git a/alpine3-12.dockerfile b/alpine3-12.dockerfile index e21f425..f57e18c 100644 --- a/alpine3-12.dockerfile +++ b/alpine3-12.dockerfile @@ -177,7 +177,11 @@ RUN sed -i 's,/bin/mail,/usr/bin/mail,' ${NAGIOS_HOME}/etc/objects/commands.cfg sed -i 's/^.*command_line.*Host Alert.*$//g' /opt/nagios/etc/objects/commands.cfg && \ sed -i 's/^.*command_line.*Service Alert.*$//g' /opt/nagios/etc/objects/commands.cfg && \ sed -i '/notify-host-by-email/a command_line /usr/bin/printf "%b" "Subject: $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$\\n\\n***** Nagios *****\\n\\nNotification Type: $NOTIFICATIONTYPE$\\nHost: $HOSTNAME$\\nState: $HOSTSTATE$\\nAddress: $HOSTADDRESS$\\nInfo: $HOSTOUTPUT$\\n\\nDate/Time: $LONGDATETIME$\\n" | /usr/sbin/sendmail -v $CONTACTEMAIL$' ${NAGIOS_HOME}/etc/objects/commands.cfg && \ - sed -i '/notify-service-by-email/a command_line /usr/bin/printf "%b" "Subject: $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$\\n\\n***** Nagios *****\\n\\nNotification Type: $NOTIFICATIONTYPE$\\n\\nService: $SERVICEDESC$\\nHost: $HOSTALIAS$\\nAddress: $HOSTADDRESS$\\nState: $SERVICESTATE$\\n\\nDate/Time: $LONGDATETIME$\\n\\nAdditional Info:\\n\\n$SERVICEOUTPUT$\\n" | /usr/sbin/sendmail -v $CONTACTEMAIL$' ${NAGIOS_HOME}/etc/objects/commands.cfg + sed -i '/notify-service-by-email/a command_line /usr/bin/printf "%b" "Subject: $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$\\n\\n***** Nagios *****\\n\\nNotification Type: $NOTIFICATIONTYPE$\\n\\nService: $SERVICEDESC$\\nHost: $HOSTALIAS$\\nAddress: $HOSTADDRESS$\\nState: $SERVICESTATE$\\n\\nDate/Time: $LONGDATETIME$\\n\\nAdditional Info:\\n\\n$SERVICEOUTPUT$\\n" | /usr/sbin/sendmail -v $CONTACTEMAIL$' ${NAGIOS_HOME}/etc/objects/commands.cfg && \ + \ + : '# Modify etc/resource.cfg in order to include custom plugins directory' && \ + sed -i 's/^\(.*\)\(Sets .USER2. to be the path to\) event handlers.*$/\1\2 custom plugins directory/g' "${NAGIOS_HOME}"/etc/resource.cfg && \ + sed -i 's;^#\([$]USER2[$]=\).*$;\1/opt/Custom-Nagios-Plugins;g' "${NAGIOS_HOME}"/etc/resource.cfg RUN echo "use_timezone=${NAGIOS_TIMEZONE}" >> ${NAGIOS_HOME}/etc/nagios.cfg && \ sed -i 's/date_format=us/date_format=iso8601/g' ${NAGIOS_HOME}/etc/nagios.cfg diff --git a/overlay/usr/local/bin/start_nagios b/overlay/usr/local/bin/start_nagios index e906cd5..35e0729 100755 --- a/overlay/usr/local/bin/start_nagios +++ b/overlay/usr/local/bin/start_nagios @@ -6,42 +6,70 @@ set -eu # this script becomes PID 1 inside the container, catches termination signals, and stops # processes managed by runit -if [ -z "$(ls -A ${NAGIOS_HOME}/etc)" ]; then - echo "Started with empty ETC, copying example data in-place" - cp -Rp /orig/etc/* ${NAGIOS_HOME}/etc/ -fi +# Prints a line by prepending the date in ISO-8601 format +# usage: logDate MESSAGE +# ie: logDate "Spongebob" +logDate() { + mydate=`date +"%Y-%m-%dT%H:%M:%S%z"` -if [ -z "$(ls -A ${NAGIOS_HOME}/var)" ]; then - echo "Started with empty VAR, copying example data in-place" - cp -Rp /orig/var/* ${NAGIOS_HOME}/var/ -fi + echo "${mydate} $@" +} -if [ ! -f "${NAGIOS_HOME}/etc/htpasswd.users" ] ; then - htpasswd -c -b -s "${NAGIOS_HOME}/etc/htpasswd.users" "${NAGIOSADMIN_USER}" "${NAGIOSADMIN_PASS}" - chown -R ${NAGIOS_USER}:${NAGIOS_GROUP} "${NAGIOS_HOME}/etc/htpasswd.users" -fi +# Run custom scripts provided by the user +# usage: run_custom_scripts PATH +# ie: run_custom_scripts /container-entrypoint-init-scripts +# This runs *.sh files +# Adapted from: https://github.com/gvenzl/oci-oracle-xe/blob/0cedd27ab04771789f1425639434d33940935f6c/container-entrypoint.sh +run_custom_scripts() { -# Set current $NAGIOSADMIN_USER to the configuration of $NAGIOS_HOME/etc/cgi.cfg -if [ "${NAGIOSADMIN_USER}" != "nagiosadmin" ]; then - echo "Modifying ${NAGIOS_HOME}/etc/cgi.cfg in order to use ${NAGIOSADMIN_USER} as its authorised user" - sed -i "s|\(authorized_for_system_information=\).*|\1${NAGIOSADMIN_USER}|g" /opt/nagios/etc/cgi.cfg - sed -i "s|\(authorized_for_configuration_information=\).*|\1${NAGIOSADMIN_USER}|g" /opt/nagios/etc/cgi.cfg - sed -i "s|\(authorized_for_system_commands=\).*|\1${NAGIOSADMIN_USER}|g" /opt/nagios/etc/cgi.cfg - sed -i "s|\(authorized_for_all_services=\).*|\1${NAGIOSADMIN_USER}|g" /opt/nagios/etc/cgi.cfg - sed -i "s|\(authorized_for_all_hosts=\).*|\1${NAGIOSADMIN_USER}|g" /opt/nagios/etc/cgi.cfg - sed -i "s|\(authorized_for_all_service_commands=\).*|\1${NAGIOSADMIN_USER}|g" /opt/nagios/etc/cgi.cfg - sed -i "s|\(authorized_for_all_host_commands=\).*|\1${NAGIOSADMIN_USER}|g" /opt/nagios/etc/cgi.cfg -fi + SCRIPTS_ROOT="${1}"; -# Remove pid files + # Check whether parameter has been passed on + if [ -z "${SCRIPTS_ROOT}" ]; then + echo "No SCRIPTS_ROOT passed on, no scripts will be run."; + return; + fi; -echo -n "Removing Apache HTTPD PID file before starting it ..." -(rm -f /var/run/apache2/httpd.pid || true) -echo "OK" + # Execute custom provided files (only if directory exists and has files in it) + if [ -d "${SCRIPTS_ROOT}" ] && [ -n "$(ls -A "${SCRIPTS_ROOT}")" ]; then -echo -n "Removing rsyslogd PID file before starting it ..." -(rm -f /var/run/rsyslogd.pid || true) -echo "OK" + echo -e "\nCONTAINER: Executing user defined scripts..." + + run_custom_scripts_recursive ${SCRIPTS_ROOT} + + echo -e "CONTAINER: DONE: Executing user defined scripts.\n" + + fi; +} + +# This recursive function traverses through sub directories by calling itself with them +# usage: run_custom_scripts_recursive PATH +# ie: run_custom_scripts_recursive /container-entrypoint-init-scripts/001_subdir +# This runs *.sh files and traveres in sub directories +# Adapted from: https://github.com/gvenzl/oci-oracle-xe/blob/0cedd27ab04771789f1425639434d33940935f6c/container-entrypoint.sh +run_custom_scripts_recursive() { + local f + for f in "${1}"/*; do + case "${f}" in + *.sh) + if [ -x "${f}" ]; then + echo -e "\nCONTAINER: running ${f} ..."; "${f}"; echo "CONTAINER: DONE: running ${f}" + else + echo -e "\nCONTAINER: sourcing ${f} ..."; . "${f}" echo "CONTAINER: DONE: sourcing ${f}" + fi; + ;; + + *) + if [ -d "${f}" ]; then + echo -e "\nCONTAINER: descending into ${f} ..."; run_custom_scripts_recursive "${f}"; echo "CONTAINER: DONE: descending into ${f}" + else + echo -e "\nCONTAINER: ignoring ${f}" + fi; + ;; + esac + echo ""; + done +} # This function sets the timezone to Nagios and Apache configuration files setTimezone() { @@ -102,6 +130,60 @@ shutdown() { exit } +### =========== ### +### MAIN METHOD ### +### =========== ### + +# If it is the first container startup / initialization, +# execute any custom user scripts +if [ ! -f "${NAGIOS_HOME}/container_first_run" ]; then + run_custom_scripts /container-entrypoint-init-scripts + + # After scripts complete, create ${NAGIOS_HOME}/container_first_run + # file to mark the end of first startup + touch "${NAGIOS_HOME}/container_first_run" +fi + +# If the $NAGIOS_HOME/etc directory is empty, copy example configuration +if [ -z "$(ls -A ${NAGIOS_HOME}/etc)" ]; then + echo "Started with empty ETC, copying example data in-place" + cp -Rp /orig/etc/* ${NAGIOS_HOME}/etc/ +fi + +# If the $NAGIOS_HOME/var directory is empty, copy example data +if [ -z "$(ls -A ${NAGIOS_HOME}/var)" ]; then + echo "Started with empty VAR, copying example data in-place" + cp -Rp /orig/var/* ${NAGIOS_HOME}/var/ +fi + +# If the htpasswd.users file does not exist, create a new one and place NAGIOSADMINUSER as +# its first user +if [ ! -f "${NAGIOS_HOME}/etc/htpasswd.users" ] ; then + htpasswd -c -b -s "${NAGIOS_HOME}/etc/htpasswd.users" "${NAGIOSADMIN_USER}" "${NAGIOSADMIN_PASS}" + chown -R ${NAGIOS_USER}:${NAGIOS_GROUP} "${NAGIOS_HOME}/etc/htpasswd.users" +fi + +# Set current $NAGIOSADMIN_USER to the configuration of $NAGIOS_HOME/etc/cgi.cfg +if [ "${NAGIOSADMIN_USER}" != "nagiosadmin" ]; then + echo "Modifying ${NAGIOS_HOME}/etc/cgi.cfg in order to use ${NAGIOSADMIN_USER} as its authorised user" + sed -i "s|\(authorized_for_system_information=\).*|\1${NAGIOSADMIN_USER}|g" /opt/nagios/etc/cgi.cfg + sed -i "s|\(authorized_for_configuration_information=\).*|\1${NAGIOSADMIN_USER}|g" /opt/nagios/etc/cgi.cfg + sed -i "s|\(authorized_for_system_commands=\).*|\1${NAGIOSADMIN_USER}|g" /opt/nagios/etc/cgi.cfg + sed -i "s|\(authorized_for_all_services=\).*|\1${NAGIOSADMIN_USER}|g" /opt/nagios/etc/cgi.cfg + sed -i "s|\(authorized_for_all_hosts=\).*|\1${NAGIOSADMIN_USER}|g" /opt/nagios/etc/cgi.cfg + sed -i "s|\(authorized_for_all_service_commands=\).*|\1${NAGIOSADMIN_USER}|g" /opt/nagios/etc/cgi.cfg + sed -i "s|\(authorized_for_all_host_commands=\).*|\1${NAGIOSADMIN_USER}|g" /opt/nagios/etc/cgi.cfg +fi + +# Remove pid files +echo -n "Removing Apache HTTPD PID file before starting it ..." +(rm -f /var/run/apache2/httpd.pid || true) +echo "OK" + +echo -n "Removing rsyslogd PID file before starting it ..." +(rm -f /var/run/rsyslogd.pid || true) +echo "OK" + # Set timezones before start setTimezone From 5a00b373755b4daa3e5ec90b8d9e01cc8198f4de Mon Sep 17 00:00:00 2001 From: Christos Manios Date: Wed, 26 Nov 2025 13:18:18 +0200 Subject: [PATCH 43/55] Remove gosu entirely (#91) --- Dockerfile | 16 ---------------- alpine3-12.dockerfile | 16 ---------------- 2 files changed, 32 deletions(-) diff --git a/Dockerfile b/Dockerfile index a2f62b4..8bee99f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -35,22 +35,6 @@ RUN addgroup -S ${NAGIOS_GROUP} && \ lm-sensors perl net-snmp-perl perl-net-snmp perl-crypt-x509 \ perl-timedate perl-libwww perl-text-glob samba-client openssh openssl \ net-snmp-tools bind-tools gd gd-dev bash && \ - \ - : '# For x86 the binary is : gosu-i386' && \ - : '# For x64 the binary is : gosu-amd64' && \ - : '# For arm-v6 the binary is : gosu-armel' && \ - : '# For arm-v7 the binary is : gosu-armhf' && \ - : '# For arm64 the binary is : gosu-arm64' && \ - : '# For arm64/v8 the binary is : gosu-arm64' && \ - : '#######################################' && \ - : '# Creating an associative array with the platforms and their respective gosu release DOES NOT WORK in /bin/sh' && \ - echo "Arguments TARGETPLATFORM: ${TARGETPLATFORM} and BUILDPLATFORM: ${BUILDPLATFORM}" && \ - echo "$TARGETPLATFORM" | awk '{ gosuBinArr["linux/386"]="gosu-i386"; gosuBinArr["linux/amd64"]="gosu-amd64"; gosuBinArr["linux/arm/v6"]="gosu-armel"; gosuBinArr["linux/arm/v7"]="gosu-armhf"; gosuBinArr["linux/arm64"]="gosu-arm64"; gosuBinArr["linux/arm64/v8"]="gosu-arm64"; print gosuBinArr[$0];}' > mygosuver.txt && \ - gosuPlatform=$(cat mygosuver.txt) && \ - echo "Downloading ${gosuPlatform} for platform $TARGETPLATFORM" &&\ - curl -L -o gosu "https://github.com/tianon/gosu/releases/download/1.19/${gosuPlatform}" && \ - mv gosu /bin/ && \ - chmod 755 /bin/gosu && \ addgroup -S apache ${NAGIOS_CMDGROUP} diff --git a/alpine3-12.dockerfile b/alpine3-12.dockerfile index f57e18c..67ce77b 100644 --- a/alpine3-12.dockerfile +++ b/alpine3-12.dockerfile @@ -35,22 +35,6 @@ RUN addgroup -S ${NAGIOS_GROUP} && \ lm-sensors perl net-snmp-perl perl-net-snmp perl-crypt-x509 \ perl-timedate perl-libwww perl-text-glob samba-client openssh openssl \ net-snmp-tools bind-tools gd gd-dev bash && \ - \ - : '# For x86 the binary is : gosu-i386' && \ - : '# For x64 the binary is : gosu-amd64' && \ - : '# For arm-v6 the binary is : gosu-armel' && \ - : '# For arm-v7 the binary is : gosu-armhf' && \ - : '# For arm64 the binary is : gosu-arm64' && \ - : '# For arm64/v8 the binary is : gosu-arm64' && \ - : '#######################################' && \ - : '# Creating an associative array with the platforms and their respective gosu release DOES NOT WORK in /bin/sh' && \ - echo "Arguments TARGETPLATFORM: ${TARGETPLATFORM} and BUILDPLATFORM: ${BUILDPLATFORM}" && \ - echo "$TARGETPLATFORM" | awk '{ gosuBinArr["linux/386"]="gosu-i386"; gosuBinArr["linux/amd64"]="gosu-amd64"; gosuBinArr["linux/arm/v6"]="gosu-armel"; gosuBinArr["linux/arm/v7"]="gosu-armhf"; gosuBinArr["linux/arm64"]="gosu-arm64"; gosuBinArr["linux/arm64/v8"]="gosu-arm64"; print gosuBinArr[$0];}' > mygosuver.txt && \ - gosuPlatform=$(cat mygosuver.txt) && \ - echo "Downloading ${gosuPlatform} for platform $TARGETPLATFORM" &&\ - curl -L -o gosu "https://github.com/tianon/gosu/releases/download/1.17/${gosuPlatform}" && \ - mv gosu /bin/ && \ - chmod 755 /bin/gosu && \ addgroup -S apache ${NAGIOS_CMDGROUP} From 196a449b4b96566094d487df60cf2d62f2fbaf45 Mon Sep 17 00:00:00 2001 From: Christos Manios Date: Fri, 28 Nov 2025 12:57:18 +0200 Subject: [PATCH 44/55] Release build 31 --- CHANGELOG.md | 19 +++++++++++++++++++ Dockerfile | 4 ++-- LICENCE | 4 ++-- README.md | 8 +++++++- alpine3-12.dockerfile | 4 ++-- 5 files changed, 32 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 297428f..fd545ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,25 @@ This Docker image contains more than one software (Nagios, Nagios plugins, NRPE, Apache HTTPD, etc.) with different versions. Hence we decided to name the releases with the naming `Build - ` which will have an incremental unsigned integer. In this document we will describe the contents of every image in every build. +## Build 31 (2025-12-01) + +* Nagios core: v4.5.10 +* Nagios plugins: v2.4.12 +* NRPE: 4.1.3 +* Alpine: + * 3.22.2: `amd64`, `i386`, `arm64` + * 3.12.12: `arm/v6`, `arm/v7` + +### Features + +* Upgrade to Nagios Core `4.5.10`. ([#95](https://github.com/manios/docker-nagios/issues/95)) +* Add init script functionality. ([#96](https://github.com/manios/docker-nagios/issues/96)) +* Remove [gosu](https://github.com/tianon/gosu) from the image as it is not needed anymore. ([#91](https://github.com/manios/docker-nagios/issues/91)) + +### Bug Fixes + +* Modify `etc/resource.cfg` in order to include custom plugins directory. + ## Build 30 (2025-04-10) * Nagios core: v4.5.9 diff --git a/Dockerfile b/Dockerfile index 8bee99f..9036350 100644 --- a/Dockerfile +++ b/Dockerfile @@ -190,7 +190,7 @@ LABEL name="Nagios" \ nrpeVersion=$NRPE_VERSION \ homepage="https://www.nagios.com/" \ maintainer="Christos Manios " \ - build="31-snapshot" \ + build="31" \ org.opencontainers.image.title="Nagios" \ org.opencontainers.image.description="Nagios, the Industry Standard In IT Infrastructure Monitoring" \ org.opencontainers.image.vendor="Nagios" \ @@ -199,7 +199,7 @@ LABEL name="Nagios" \ org.opencontainers.image.url="https://hub.docker.com/r/manios/nagios" \ org.opencontainers.image.source="https://github.com/manios/docker-nagios" \ org.opencontainers.image.documentation="https://github.com/manios/docker-nagios/blob/master/README.md" \ - org.opencontainers.image.version="31-snapshot" + org.opencontainers.image.version="31" RUN mkdir -p ${NAGIOS_HOME} && \ mkdir -p /orig/apache2 diff --git a/LICENCE b/LICENCE index c364beb..4f99803 100644 --- a/LICENCE +++ b/LICENCE @@ -1,6 +1,6 @@ MIT License -Copyright 2024 Christos Manios +Copyright 2025 Christos Manios Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -10,7 +10,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI MIT License -Copyright 2024 Jason Rivers +Copyright 2025 Jason Rivers Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/README.md b/README.md index 20cbc39..d2055bf 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Build Status: ## Supported tags and respective `Dockerfile` links -* `4.5.9`, `4.5`, `latest` [(4.5.9/Dockerfile)](https://github.com/manios/docker-nagios/blob/master/Dockerfile) +* `4.5.10`, `4.5`, `latest` [(4.5.10/Dockerfile)](https://github.com/manios/docker-nagios/blob/master/Dockerfile) For more information about the image versions you may refer to the [CHANGELOG](https://github.com/manios/docker-nagios/blob/master/CHANGELOG.md) @@ -98,6 +98,8 @@ docker run -d --name nagios \ manios/nagios:latest ``` +For a detailed example you can have a look here: https://github.com/manios/docker-nagios/issues/96. + ## Flavours This Docker image is designed with optimising resources usage in mind and is build for multiple hardware architectures. The following matrix can be used to determine if your hardware architecture is represented in a docker image tag: @@ -120,6 +122,10 @@ To check if your Nagios configuration is OK, you can run the following while you docker exec -it mynagioscontainer bin/nagios -v etc/nagios.cfg ``` +## Custom plugins + +This image comes with the official [Nagios Plugins](https://github.com/nagios-plugins/nagios-plugins) preinstalled in order to remain lightweight in size. If you want to use custom plugins, you can install them in the `/opt/Custom-Nagios-Plugins` by using init scripts. + ## Troubleshooting ### Nagios keeps restarting or shows a strange behaviour diff --git a/alpine3-12.dockerfile b/alpine3-12.dockerfile index 67ce77b..9684a64 100644 --- a/alpine3-12.dockerfile +++ b/alpine3-12.dockerfile @@ -190,7 +190,7 @@ LABEL name="Nagios" \ nrpeVersion=$NRPE_VERSION \ homepage="https://www.nagios.com/" \ maintainer="Christos Manios " \ - build="31-snapshot" \ + build="31" \ org.opencontainers.image.title="Nagios" \ org.opencontainers.image.description="Nagios, the Industry Standard In IT Infrastructure Monitoring" \ org.opencontainers.image.vendor="Nagios" \ @@ -199,7 +199,7 @@ LABEL name="Nagios" \ org.opencontainers.image.url="https://hub.docker.com/r/manios/nagios" \ org.opencontainers.image.source="https://github.com/manios/docker-nagios" \ org.opencontainers.image.documentation="https://github.com/manios/docker-nagios/blob/master/README.md" \ - org.opencontainers.image.version="31-snapshot" + org.opencontainers.image.version="31" RUN mkdir -p ${NAGIOS_HOME} && \ mkdir -p /orig/apache2 From 2e618492a2f5fff0567f9c1a1182d315db90a605 Mon Sep 17 00:00:00 2001 From: Christos Manios Date: Mon, 1 Dec 2025 12:50:39 +0200 Subject: [PATCH 45/55] Try again to build with Alpine 3.23 for all architectures. (#92) --- .github/workflows/github-build.yml | 134 ++-------------- Dockerfile | 6 +- alpine3-12.dockerfile | 245 ----------------------------- 3 files changed, 17 insertions(+), 368 deletions(-) delete mode 100644 alpine3-12.dockerfile diff --git a/.github/workflows/github-build.yml b/.github/workflows/github-build.yml index a57007c..5d5e7c4 100644 --- a/.github/workflows/github-build.yml +++ b/.github/workflows/github-build.yml @@ -92,22 +92,11 @@ jobs: --progress plain \ --cache-from "type=local,src=/tmp/.buildx-cache" \ --cache-to "type=local,dest=/tmp/.buildx-cache" \ - --platform linux/386,linux/amd64,linux/arm64 \ + --platform linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 \ --label "gitCommit=${{ github.sha }}" \ --label "org.opencontainers.image.revision=${{ github.sha }}" \ - --tag ${GITHUB_ACTOR}/nagios:alpine-3-21-${{ env.action_mytag }} \ - --output "type=image,push=false" -f Dockerfile . - - name: Docker Buildx (build and cache) for linux/arm/v6,linux/arm/v7 (Alpine 3.12) - run: | - docker buildx build \ - --progress plain \ - --cache-from "type=local,src=/tmp/.buildx-cache" \ - --cache-to "type=local,dest=/tmp/.buildx-cache" \ - --platform linux/arm/v6,linux/arm/v7 \ - --label "gitCommit=${{ github.sha }}" \ - --label "org.opencontainers.image.revision=${{ github.sha }}" \ - --tag ${GITHUB_ACTOR}/nagios:alpine-3-12-${{ env.action_mytag }} \ - --output "type=image,push=false" -f alpine3-12.dockerfile . + --tag ${GITHUB_ACTOR}/nagios:${{ env.action_mytag }} \ + --output "type=image,push=false" . - name: 'Docker Buildx: Push to Dockerhub' run: | echo "== This branch is : ${GITHUB_REF}" @@ -115,118 +104,23 @@ jobs: docker buildx build \ --progress plain \ --cache-from "type=local,src=/tmp/.buildx-cache" \ - --platform linux/386,linux/amd64,linux/arm64 \ + --platform linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 \ --label "gitCommit=${{ github.sha }}" \ --label "org.opencontainers.image.revision=${{ github.sha }}" \ - --tag ${GITHUB_ACTOR}/nagios:alpine-3-21-${{ env.action_mytag }} \ - --output "type=image,push=true" -f Dockerfile . - - name: 'Docker Buildx: Push to Dockerhub for linux/arm/v6,linux/arm/v7 (Alpine 3.12)' - run: | - echo "== This branch is : ${GITHUB_REF}" - echo "Will push image ${GITHUB_ACTOR}/nagios:${{ env.action_mytag }} to DockerHub" - docker buildx build \ - --progress plain \ - --cache-from "type=local,src=/tmp/.buildx-cache" \ - --platform linux/arm/v6,linux/arm/v7 \ - --label "gitCommit=${{ github.sha }}" \ - --label "org.opencontainers.image.revision=${{ github.sha }}" \ - --tag ${GITHUB_ACTOR}/nagios:alpine-3-12-${{ env.action_mytag }} \ - --output "type=image,push=true" -f alpine3-12.dockerfile . + --tag ${GITHUB_ACTOR}/nagios:${{ env.action_mytag }} \ + --output "type=image,push=true" . - name: 'Docker Buildx: Push to GitHub Container Registry' - run: | - echo "== This branch is : ${GITHUB_REF}" - echo "Will push image ghcr.io/${GITHUB_ACTOR}/nagios:${{ env.action_mytag }} to DockerHub" - docker buildx build \ - --progress plain \ - --cache-from "type=local,src=/tmp/.buildx-cache" \ - --platform linux/386,linux/amd64,linux/arm64 \ - --label "gitCommit=${{ github.sha }}" \ - --label "org.opencontainers.image.revision=${{ github.sha }}" \ - --tag ghcr.io/${GITHUB_ACTOR}/nagios:alpine-3-21-${{ env.action_mytag }} \ - --output "type=image,push=true" -f Dockerfile . - - name: 'Docker Buildx: Push to GitHub Container Registry for linux/arm/v6,linux/arm/v7 (Alpine 3.12)' - run: | - echo "== This branch is : ${GITHUB_REF}" - echo "Will push image ghcr.io/${GITHUB_ACTOR}/nagios:${{ env.action_mytag }} to DockerHub" - docker buildx build \ - --progress plain \ - --cache-from "type=local,src=/tmp/.buildx-cache" \ - --platform linux/arm/v6,linux/arm/v7 \ - --label "gitCommit=${{ github.sha }}" \ - --label "org.opencontainers.image.revision=${{ github.sha }}" \ - --tag ghcr.io/${GITHUB_ACTOR}/nagios:alpine-3-12-${{ env.action_mytag }} \ - --output "type=image,push=true" -f alpine3-12.dockerfile . - - name: Download and configure jq - run: | - echo "Download jq" - wget https://github.com/jqlang/jq/releases/download/jq-1.7.1/jq-linux-amd64 - echo "Configure jq" - mv jq-linux-amd64 jq - chmod 744 jq - - name: Create a new unified manifest for Dockerhub - run: | - echo "Download manifest of ${GITHUB_ACTOR}/nagios:alpine-3-21-${{ env.action_mytag }}" - docker buildx imagetools inspect ${GITHUB_ACTOR}/nagios:alpine-3-21-${{ env.action_mytag }} --raw > manifest1.json - echo "Download manifest of ${GITHUB_ACTOR}/nagios:alpine-3-12-${{ env.action_mytag }}" - docker buildx imagetools inspect ${GITHUB_ACTOR}/nagios:alpine-3-12-${{ env.action_mytag }} --raw > manifest2.json - ls -l manifest*json - SHA256_AMD64=$(cat manifest1.json | ./jq -r '.manifests[]| select(.platform.architecture == "amd64") | .digest') - SHA256_ARM64=$(cat manifest1.json | ./jq -r '.manifests[]| select(.platform.architecture == "arm64") | .digest') - SHA256_I386=$(cat manifest1.json | ./jq -r '.manifests[]| select(.platform.architecture == "386") | .digest') - SHA256_ARMV6=$(cat manifest2.json | ./jq -r '.manifests[]| select(.platform.architecture == "arm") | select(.platform.variant == "v6") | .digest') - SHA256_ARMV7=$(cat manifest2.json | ./jq -r '.manifests[]| select(.platform.architecture == "arm") | select(.platform.variant == "v7") | .digest') - echo "Creating new manifest: ${GITHUB_ACTOR}/nagios:${{ env.action_mytag }}" - set -eux - docker manifest create --amend ${GITHUB_ACTOR}/nagios:${{ env.action_mytag }} \ - "${GITHUB_ACTOR}/nagios@${SHA256_AMD64}" \ - "${GITHUB_ACTOR}/nagios@${SHA256_ARM64}" \ - "${GITHUB_ACTOR}/nagios@${SHA256_I386}" \ - "${GITHUB_ACTOR}/nagios@${SHA256_ARMV6}" \ - "${GITHUB_ACTOR}/nagios@${SHA256_ARMV7}" - echo "Annotating new manifest: ${GITHUB_ACTOR}/nagios:${{ env.action_mytag }} with platforms and architectures" - docker manifest annotate ${GITHUB_ACTOR}/nagios:${{ env.action_mytag }} "${GITHUB_ACTOR}/nagios@${SHA256_AMD64}" --arch amd64 --os linux - docker manifest annotate ${GITHUB_ACTOR}/nagios:${{ env.action_mytag }} "${GITHUB_ACTOR}/nagios@${SHA256_ARM64}" --arch arm64 --os linux - docker manifest annotate ${GITHUB_ACTOR}/nagios:${{ env.action_mytag }} "${GITHUB_ACTOR}/nagios@${SHA256_I386}" --arch 386 --os linux - docker manifest annotate ${GITHUB_ACTOR}/nagios:${{ env.action_mytag }} "${GITHUB_ACTOR}/nagios@${SHA256_ARMV6}" --arch arm --os linux --variant v6 - docker manifest annotate ${GITHUB_ACTOR}/nagios:${{ env.action_mytag }} "${GITHUB_ACTOR}/nagios@${SHA256_ARMV7}" --arch arm --os linux --variant v7 - - name: Create a new unified manifest for GitHub Container Registry - run: | - echo "Download manifest of ghcr.io/${GITHUB_ACTOR}/nagios:alpine-3-21-${{ env.action_mytag }}" - docker buildx imagetools inspect ghcr.io/${GITHUB_ACTOR}/nagios:alpine-3-21-${{ env.action_mytag }} --raw > manifest1.json - echo "Download manifest of ghcr.io/${GITHUB_ACTOR}/nagios:alpine-3-12-${{ env.action_mytag }}" - docker buildx imagetools inspect ghcr.io/${GITHUB_ACTOR}/nagios:alpine-3-12-${{ env.action_mytag }} --raw > manifest2.json - ls -l manifest*json - SHA256_AMD64=$(cat manifest1.json | ./jq -r '.manifests[]| select(.platform.architecture == "amd64") | .digest') - SHA256_ARM64=$(cat manifest1.json | ./jq -r '.manifests[]| select(.platform.architecture == "arm64") | .digest') - SHA256_I386=$(cat manifest1.json | ./jq -r '.manifests[]| select(.platform.architecture == "386") | .digest') - SHA256_ARMV6=$(cat manifest2.json | ./jq -r '.manifests[]| select(.platform.architecture == "arm") | select(.platform.variant == "v6") | .digest') - SHA256_ARMV7=$(cat manifest2.json | ./jq -r '.manifests[]| select(.platform.architecture == "arm") | select(.platform.variant == "v7") | .digest') - echo "Creating new manifest: ghcr.io/${GITHUB_ACTOR}/nagios:${{ env.action_mytag }}" - set -eux - docker manifest create --amend ghcr.io/${GITHUB_ACTOR}/nagios:${{ env.action_mytag }} \ - ghcr.io/"${GITHUB_ACTOR}/nagios@${SHA256_AMD64}" \ - ghcr.io/"${GITHUB_ACTOR}/nagios@${SHA256_ARM64}" \ - ghcr.io/"${GITHUB_ACTOR}/nagios@${SHA256_I386}" \ - ghcr.io/"${GITHUB_ACTOR}/nagios@${SHA256_ARMV6}" \ - ghcr.io/"${GITHUB_ACTOR}/nagios@${SHA256_ARMV7}" - echo "Annotating new manifest: ghcr.io/${GITHUB_ACTOR}/nagios:${{ env.action_mytag }} with platforms and architectures" - docker manifest annotate ghcr.io/${GITHUB_ACTOR}/nagios:${{ env.action_mytag }} ghcr.io/"${GITHUB_ACTOR}/nagios@${SHA256_AMD64}" --arch amd64 --os linux - docker manifest annotate ghcr.io/${GITHUB_ACTOR}/nagios:${{ env.action_mytag }} ghcr.io/"${GITHUB_ACTOR}/nagios@${SHA256_ARM64}" --arch arm64 --os linux - docker manifest annotate ghcr.io/${GITHUB_ACTOR}/nagios:${{ env.action_mytag }} ghcr.io/"${GITHUB_ACTOR}/nagios@${SHA256_I386}" --arch 386 --os linux - docker manifest annotate ghcr.io/${GITHUB_ACTOR}/nagios:${{ env.action_mytag }} ghcr.io/"${GITHUB_ACTOR}/nagios@${SHA256_ARMV6}" --arch arm --os linux --variant v6 - docker manifest annotate ghcr.io/${GITHUB_ACTOR}/nagios:${{ env.action_mytag }} ghcr.io/"${GITHUB_ACTOR}/nagios@${SHA256_ARMV7}" --arch arm --os linux --variant v7 - - name: 'Push manifest to DockerHub' - run: | - echo "== This branch is : ${GITHUB_REF}" - echo "Will push image manifest ${GITHUB_ACTOR}/nagios:${{ env.action_mytag }} to DockerHub Registry" - docker manifest push ${GITHUB_ACTOR}/nagios:${{ env.action_mytag }} - - name: 'Push manifest to GitHub Container Registry' run: | echo "== This branch is : ${GITHUB_REF}" echo "Will push image ghcr.io/${GITHUB_ACTOR}/nagios:${{ env.action_mytag }} to GitHub Container Registry" - docker manifest push ghcr.io/${GITHUB_ACTOR}/nagios:${{ env.action_mytag }} + docker buildx build \ + --progress plain \ + --cache-from "type=local,src=/tmp/.buildx-cache" \ + --platform linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 \ + --label "gitCommit=${{ github.sha }}" \ + --label "org.opencontainers.image.revision=${{ github.sha }}" \ + --tag ghcr.io/${GITHUB_ACTOR}/nagios:${{ env.action_mytag }} \ + --output "type=image,push=true" . - name: Inspect image run: | docker buildx imagetools inspect ${GITHUB_ACTOR}/nagios:${{ env.action_mytag }} - docker buildx imagetools inspect ghcr.io/${GITHUB_ACTOR}/nagios:${{ env.action_mytag }} - diff --git a/Dockerfile b/Dockerfile index 9036350..7a212e3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ # https://www.docker.com/blog/docker-arm-virtual-meetup-multi-arch-with-buildx/ -FROM alpine:3.22 AS builder-base +FROM alpine:3.23 AS builder-base ARG TARGETPLATFORM ARG BUILDPLATFORM @@ -190,7 +190,7 @@ LABEL name="Nagios" \ nrpeVersion=$NRPE_VERSION \ homepage="https://www.nagios.com/" \ maintainer="Christos Manios " \ - build="31" \ + build="32-snapshot" \ org.opencontainers.image.title="Nagios" \ org.opencontainers.image.description="Nagios, the Industry Standard In IT Infrastructure Monitoring" \ org.opencontainers.image.vendor="Nagios" \ @@ -199,7 +199,7 @@ LABEL name="Nagios" \ org.opencontainers.image.url="https://hub.docker.com/r/manios/nagios" \ org.opencontainers.image.source="https://github.com/manios/docker-nagios" \ org.opencontainers.image.documentation="https://github.com/manios/docker-nagios/blob/master/README.md" \ - org.opencontainers.image.version="31" + org.opencontainers.image.version="32-snapshot" RUN mkdir -p ${NAGIOS_HOME} && \ mkdir -p /orig/apache2 diff --git a/alpine3-12.dockerfile b/alpine3-12.dockerfile deleted file mode 100644 index 9684a64..0000000 --- a/alpine3-12.dockerfile +++ /dev/null @@ -1,245 +0,0 @@ -### ================================== ### -### STAGE 1 CREATE PARENT IMAGE ### -### ================================== ### - -# https://www.docker.com/blog/docker-arm-virtual-meetup-multi-arch-with-buildx/ - -FROM alpine:3.12 AS builder-base - -ARG TARGETPLATFORM -ARG BUILDPLATFORM - -ENV NAGIOS_HOME=/opt/nagios \ - NAGIOS_USER=nagios \ - NAGIOS_GROUP=nagios \ - NAGIOS_CMDUSER=nagios \ - NAGIOS_CMDGROUP=nagios \ - NAGIOS_TIMEZONE=UTC \ - NAGIOS_FQDN=nagios.example.com \ - NAGIOSADMIN_USER=nagiosadmin \ - NAGIOSADMIN_PASS=nagios \ - NAGIOS_VERSION=4.5.10 \ - NAGIOS_PLUGINS_VERSION=2.4.12 \ - NRPE_VERSION=4.1.3 \ - APACHE_LOCK_DIR=/var/run \ - APACHE_LOG_DIR=/var/log/apache2 - - -RUN addgroup -S ${NAGIOS_GROUP} && \ - adduser -S ${NAGIOS_USER} -G ${NAGIOS_CMDGROUP} -g ${NAGIOS_USER} && \ - apk update && \ - apk add --no-cache git curl unzip apache2 apache2-utils rsyslog \ - php7 php7-gd php7-cli runit parallel ssmtp \ - libltdl libintl openssl-dev php7-apache2 procps tzdata \ - libldap mariadb-connector-c freeradius-client-dev libpq libdbi \ - lm-sensors perl net-snmp-perl perl-net-snmp perl-crypt-x509 \ - perl-timedate perl-libwww perl-text-glob samba-client openssh openssl \ - net-snmp-tools bind-tools gd gd-dev bash && \ - addgroup -S apache ${NAGIOS_CMDGROUP} - - -### ================================== ### -### STAGE 2 COMPILE NAGIOS SOURCES ### -### ================================== ### - -FROM builder-base AS builder-compile -ARG TARGETPLATFORM -ARG BUILDPLATFORM - -# Add dependencies required to build Nagios -RUN apk update && \ - apk add --no-cache build-base automake libtool autoconf py-docutils gnutls \ - gnutls-dev g++ make alpine-sdk build-base gcc autoconf \ - gettext-dev linux-headers openssl-dev net-snmp net-snmp-tools \ - libcrypto1.1 libpq musl libldap libssl1.1 libdbi freeradius-client mariadb-connector-c \ - openssh-client bind-tools samba-client fping grep rpcbind \ - lm-sensors net-snmp-tools \ - file freeradius-client-dev libdbi-dev libpq linux-headers mariadb-dev \ - mariadb-connector-c-dev perl \ - net-snmp-dev openldap-dev openssl-dev postgresql-dev wget - -# Download Nagios core, plugins and nrpe sources -RUN cd /tmp && \ - echo -n "Downloading Nagios ${NAGIOS_VERSION} source code: " && \ - wget -O nagios-core.tar.gz "https://github.com/NagiosEnterprises/nagioscore/archive/refs/tags/nagios-${NAGIOS_VERSION}.tar.gz" && \ - echo -n -e "OK\nDownloading Nagios plugins ${NAGIOS_PLUGINS_VERSION} source code: " && \ - wget -O nagios-plugins.tar.gz "https://github.com/nagios-plugins/nagios-plugins/archive/refs/tags/release-${NAGIOS_PLUGINS_VERSION}.tar.gz" && \ - echo -n -e "OK\nDownloading NRPE ${NRPE_VERSION} source code: " && \ - wget -O nrpe.tar.gz "https://github.com/NagiosEnterprises/nrpe/archive/refs/tags/nrpe-${NRPE_VERSION}.tar.gz" && \ - env && \ - echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM !! == " && \ - echo "OK" - -# Compile Nagios Core -RUN ls -l /tmp && cd /tmp && \ - tar zxf nagios-core.tar.gz && \ - tar zxf nagios-plugins.tar.gz && \ - tar zxf nrpe.tar.gz && \ - cd "/tmp/nagioscore-nagios-${NAGIOS_VERSION}" && \ - echo -e "\n ===========================\n Configure Nagios Core\n ===========================\n" && \ - ./configure \ - --prefix=${NAGIOS_HOME} \ - --exec-prefix=${NAGIOS_HOME} \ - --enable-event-broker \ - --with-command-user=${NAGIOS_CMDUSER} \ - --with-command-group=${NAGIOS_CMDGROUP} \ - --with-nagios-user=${NAGIOS_USER} \ - --with-nagios-group=${NAGIOS_GROUP} && \ - : 'Apply patches to Nagios Core sources:' && \ - echo -n "Replacing \"\" with \"\": " && \ - sed -i 's///g' ./include/config.h && \ - echo "OK" && \ - echo -e "\n\n ===========================\n Compile Nagios Core\n ===========================\n" && \ - make all && \ - echo -e "\n\n ===========================\n Install Nagios Core\n ===========================\n" && \ - make install && \ - make install-commandmode && \ - make install-config && \ - make install-webconf && \ - echo -n "Nagios installed size: " && \ - du -h -s ${NAGIOS_HOME} - -# Compile Nagios Plugins -RUN echo -e "\n\n ===========================\n Configure Nagios Plugins\n ===========================\n" && \ - ls -lia /tmp && cd /tmp && \ - cd /tmp/nagios-plugins-release-${NAGIOS_PLUGINS_VERSION} && \ - ./autogen.sh && \ - ./configure --with-nagios-user=${NAGIOS_USER} \ - --with-nagios-group=${NAGIOS_USER} \ - --with-openssl \ - --prefix=${NAGIOS_HOME} \ - --with-ping-command="/bin/ping -n -w %d -c %d %s" \ - --with-ipv6 \ - --with-ping6-command="/bin/ping6 -n -w %d -c %d %s" && \ - echo "Nagios plugins configured: OK" && \ - echo -n "Replacing \"\" with \"\": " && \ - egrep -rl "\" . | xargs sed -i 's///g' && \ - egrep -rl "\"sys\/poll.h\"" . | xargs sed -i 's/"sys\/poll.h"/"poll.h"/g' && \ - echo "OK" && \ - echo -e "\n\n ===========================\n Compile Nagios Plugins\n ===========================\n" && \ - make && \ - echo "Nagios plugins compile successfully: OK" && \ - echo -e "\n\n ===========================\nInstall Nagios Plugins\n ===========================\n" && \ - make install && \ - echo "Nagios plugins installed successfully: OK" - -# Compile NRPE -RUN echo -e "\n\n =====================\n Configure NRPE\n =====================\n" && \ - cd /tmp/nrpe-nrpe-${NRPE_VERSION} && \ - ./configure --enable-command-args \ - --with-nagios-user=${NAGIOS_USER} \ - --with-nagios-group=${NAGIOS_USER} \ - --with-ssl=/usr/bin/openssl \ - --with-ssl-lib=/usr/lib && \ - echo "NRPE client configured: OK" && \ - echo -e "\n\n ===========================\n Compile NRPE\n ===========================\n" && \ - # make all && \ - make check_nrpe && \ - echo "NRPE compiled successfully: OK" && \ - echo -e "\n\n ===========================\n Install NRPE\n ===========================\n" && \ - # make install && \ - cp src/check_nrpe ${NAGIOS_HOME}/libexec/ && \ - echo "NRPE installed successfully: OK" && \ - echo -n "Final Nagios installed size: " && \ - du -h -s ${NAGIOS_HOME} - -# Compile Nagios files -# Create SSMTP configuration - - -# RUN sed -i.bak 's/.*\=www\-data//g' /etc/apache2/envvars -RUN export DOC_ROOT="DocumentRoot $(echo $NAGIOS_HOME/share)" && \ - sed -i "s,DocumentRoot.*,$DOC_ROOT," /etc/apache2/httpd.conf && \ - sed -i "s|^ *ScriptAlias.*$|ScriptAlias /cgi-bin $NAGIOS_HOME/sbin|g" /etc/apache2/httpd.conf && \ - sed -i 's/^\(.*\)#\(LoadModule cgi_module\)\(.*\)/\1\2\3/' /etc/apache2/httpd.conf && \ - echo "ServerName ${NAGIOS_FQDN}" >> /etc/apache2/httpd.conf - -RUN sed -i 's,/bin/mail,/usr/bin/mail,' ${NAGIOS_HOME}/etc/objects/commands.cfg && \ - sed -i 's,/usr/usr,/usr,' ${NAGIOS_HOME}/etc/objects/commands.cfg && \ - \ - : '# Modify Nagios mail commands in order to work with SSMTP' && \ - sed -i 's/^.*command_line.*Host Alert.*$//g' /opt/nagios/etc/objects/commands.cfg && \ - sed -i 's/^.*command_line.*Service Alert.*$//g' /opt/nagios/etc/objects/commands.cfg && \ - sed -i '/notify-host-by-email/a command_line /usr/bin/printf "%b" "Subject: $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$\\n\\n***** Nagios *****\\n\\nNotification Type: $NOTIFICATIONTYPE$\\nHost: $HOSTNAME$\\nState: $HOSTSTATE$\\nAddress: $HOSTADDRESS$\\nInfo: $HOSTOUTPUT$\\n\\nDate/Time: $LONGDATETIME$\\n" | /usr/sbin/sendmail -v $CONTACTEMAIL$' ${NAGIOS_HOME}/etc/objects/commands.cfg && \ - sed -i '/notify-service-by-email/a command_line /usr/bin/printf "%b" "Subject: $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$\\n\\n***** Nagios *****\\n\\nNotification Type: $NOTIFICATIONTYPE$\\n\\nService: $SERVICEDESC$\\nHost: $HOSTALIAS$\\nAddress: $HOSTADDRESS$\\nState: $SERVICESTATE$\\n\\nDate/Time: $LONGDATETIME$\\n\\nAdditional Info:\\n\\n$SERVICEOUTPUT$\\n" | /usr/sbin/sendmail -v $CONTACTEMAIL$' ${NAGIOS_HOME}/etc/objects/commands.cfg && \ - \ - : '# Modify etc/resource.cfg in order to include custom plugins directory' && \ - sed -i 's/^\(.*\)\(Sets .USER2. to be the path to\) event handlers.*$/\1\2 custom plugins directory/g' "${NAGIOS_HOME}"/etc/resource.cfg && \ - sed -i 's;^#\([$]USER2[$]=\).*$;\1/opt/Custom-Nagios-Plugins;g' "${NAGIOS_HOME}"/etc/resource.cfg - -RUN echo "use_timezone=${NAGIOS_TIMEZONE}" >> ${NAGIOS_HOME}/etc/nagios.cfg && \ - sed -i 's/date_format=us/date_format=iso8601/g' ${NAGIOS_HOME}/etc/nagios.cfg - -# Copy original configuration to /orig directory -RUN mkdir -p /orig/apache2 && \ - cp -r /etc/apache2/* /orig/apache2 && \ - cp -r ${NAGIOS_HOME}/etc /orig/etc && \ - cp -r ${NAGIOS_HOME}/var /orig/var - - -### ========================== ### -### START OF ACTUAL DOCKERFILE ### -### ========================== ### - -FROM builder-base - - -LABEL name="Nagios" \ - nagiosVersion=$NAGIOS_VERSION \ - nagiosPluginsVersion=$NAGIOS_PLUGINS_VERSION \ - nrpeVersion=$NRPE_VERSION \ - homepage="https://www.nagios.com/" \ - maintainer="Christos Manios " \ - build="31" \ - org.opencontainers.image.title="Nagios" \ - org.opencontainers.image.description="Nagios, the Industry Standard In IT Infrastructure Monitoring" \ - org.opencontainers.image.vendor="Nagios" \ - org.opencontainers.image.authors="Christos Manios " \ - org.opencontainers.image.licenses="MIT" \ - org.opencontainers.image.url="https://hub.docker.com/r/manios/nagios" \ - org.opencontainers.image.source="https://github.com/manios/docker-nagios" \ - org.opencontainers.image.documentation="https://github.com/manios/docker-nagios/blob/master/README.md" \ - org.opencontainers.image.version="31" - -RUN mkdir -p ${NAGIOS_HOME} && \ - mkdir -p /orig/apache2 - -WORKDIR ${NAGIOS_HOME} -COPY --from=builder-compile ${NAGIOS_HOME} ${NAGIOS_HOME} - -COPY --from=builder-compile /orig /orig - -ADD overlay/ / - -# Make -RUN chmod +x /usr/local/bin/start_nagios \ - /etc/sv/apache/run \ - /etc/sv/nagios/run \ - /etc/sv/rsyslog/run && \ - rm -rf /etc/sv/getty-5 && \ - \ - : '# enable all runit services' && \ - ln -s /etc/sv/* /etc/service && \ - \ - : '# Copy initial settings files' && \ - chown -R nagios:nagios ${NAGIOS_HOME} && \ - : '# Create special dirs' && \ - (mkdir /run/apache2 || true) && \ - mkdir -p /var/spool/rsyslog && \ - : '# Copy Apache configuration' && \ - cp -Rp /orig/apache2/* /etc/apache2 && \ - : '# Convert files to Unix format' && \ - dos2unix /etc/rsyslog.conf && \ - dos2unix /usr/local/bin/start_nagios && \ - dos2unix /etc/sv/**/run && \ - dos2unix /etc/ssmtp/ssmtp.conf && \ - : '# Add mail symbolic links to ssmtp' && \ - ln -s $(which ssmtp) /bin/mail && \ - ln -s $(which ssmtp) /usr/sbin/mail - - -EXPOSE 80 - -VOLUME "${NAGIOS_HOME}/var" "${NAGIOS_HOME}/etc" "/var/log/apache2" "/opt/Custom-Nagios-Plugins" - -CMD [ "/usr/local/bin/start_nagios" ] From 29a8acf349c9bbb750c94c2c0d7032bef6f9aa18 Mon Sep 17 00:00:00 2001 From: Christos Manios Date: Thu, 4 Dec 2025 13:01:51 +0200 Subject: [PATCH 46/55] Release build 32 --- CHANGELOG.md | 12 ++++++++++++ Dockerfile | 4 ++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fd545ec..7edda73 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,18 @@ This Docker image contains more than one software (Nagios, Nagios plugins, NRPE, Apache HTTPD, etc.) with different versions. Hence we decided to name the releases with the naming `Build - ` which will have an incremental unsigned integer. In this document we will describe the contents of every image in every build. +## Build 32 (2025-12-04) + +* Nagios core: v4.5.10 +* Nagios plugins: v2.4.12 +* NRPE: 4.1.3 +* Alpine: + * 3.23.0: `amd64`, `i386`, `arm64`,`arm/v6`, `arm/v7` + +### Features + +* Use Alpine 3.23 as base image for all architectures after [nagioscore #1025](https://github.com/NagiosEnterprises/nagioscore/issues/1025) was fixed and tested in `arm/v6` and `arm/v7`. ([#92](https://github.com/manios/docker-nagios/issues/92)) + ## Build 31 (2025-12-01) * Nagios core: v4.5.10 diff --git a/Dockerfile b/Dockerfile index 7a212e3..27e6cb9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -190,7 +190,7 @@ LABEL name="Nagios" \ nrpeVersion=$NRPE_VERSION \ homepage="https://www.nagios.com/" \ maintainer="Christos Manios " \ - build="32-snapshot" \ + build="32" \ org.opencontainers.image.title="Nagios" \ org.opencontainers.image.description="Nagios, the Industry Standard In IT Infrastructure Monitoring" \ org.opencontainers.image.vendor="Nagios" \ @@ -199,7 +199,7 @@ LABEL name="Nagios" \ org.opencontainers.image.url="https://hub.docker.com/r/manios/nagios" \ org.opencontainers.image.source="https://github.com/manios/docker-nagios" \ org.opencontainers.image.documentation="https://github.com/manios/docker-nagios/blob/master/README.md" \ - org.opencontainers.image.version="32-snapshot" + org.opencontainers.image.version="32" RUN mkdir -p ${NAGIOS_HOME} && \ mkdir -p /orig/apache2 From 78dff4a2d0bd8d0d2a82eb5f007244eb98f82ce9 Mon Sep 17 00:00:00 2001 From: Christos Manios Date: Thu, 15 Jan 2026 10:34:09 +0200 Subject: [PATCH 47/55] Upgrade to Nagios Core to 4.5.11 (#99) --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 27e6cb9..ae32908 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,7 +18,7 @@ ENV NAGIOS_HOME=/opt/nagios \ NAGIOS_FQDN=nagios.example.com \ NAGIOSADMIN_USER=nagiosadmin \ NAGIOSADMIN_PASS=nagios \ - NAGIOS_VERSION=4.5.10 \ + NAGIOS_VERSION=4.5.11 \ NAGIOS_PLUGINS_VERSION=2.4.12 \ NRPE_VERSION=4.1.3 \ APACHE_LOCK_DIR=/var/run \ @@ -190,7 +190,7 @@ LABEL name="Nagios" \ nrpeVersion=$NRPE_VERSION \ homepage="https://www.nagios.com/" \ maintainer="Christos Manios " \ - build="32" \ + build="33-snapshot" \ org.opencontainers.image.title="Nagios" \ org.opencontainers.image.description="Nagios, the Industry Standard In IT Infrastructure Monitoring" \ org.opencontainers.image.vendor="Nagios" \ @@ -199,7 +199,7 @@ LABEL name="Nagios" \ org.opencontainers.image.url="https://hub.docker.com/r/manios/nagios" \ org.opencontainers.image.source="https://github.com/manios/docker-nagios" \ org.opencontainers.image.documentation="https://github.com/manios/docker-nagios/blob/master/README.md" \ - org.opencontainers.image.version="32" + org.opencontainers.image.version="33-snapshot" RUN mkdir -p ${NAGIOS_HOME} && \ mkdir -p /orig/apache2 From 5acca589780201bbe1b1682b1c4e9b935a2e5797 Mon Sep 17 00:00:00 2001 From: Christos Manios Date: Thu, 15 Jan 2026 10:34:24 +0200 Subject: [PATCH 48/55] Release build 33 --- CHANGELOG.md | 12 ++++++++++++ Dockerfile | 4 ++-- README.md | 2 +- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7edda73..994ad30 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,18 @@ This Docker image contains more than one software (Nagios, Nagios plugins, NRPE, Apache HTTPD, etc.) with different versions. Hence we decided to name the releases with the naming `Build - ` which will have an incremental unsigned integer. In this document we will describe the contents of every image in every build. +## Build 33 (2026-01-15) + +* Nagios core: v4.5.11 +* Nagios plugins: v2.4.12 +* NRPE: 4.1.3 +* Alpine: + * 3.23.2: `amd64`, `i386`, `arm64`,`arm/v6`, `arm/v7` + +### Features + +* Upgrade to Nagios Core `4.5.11`. ([#99](https://github.com/manios/docker-nagios/issues/99)) + ## Build 32 (2025-12-04) * Nagios core: v4.5.10 diff --git a/Dockerfile b/Dockerfile index ae32908..ced64ad 100644 --- a/Dockerfile +++ b/Dockerfile @@ -190,7 +190,7 @@ LABEL name="Nagios" \ nrpeVersion=$NRPE_VERSION \ homepage="https://www.nagios.com/" \ maintainer="Christos Manios " \ - build="33-snapshot" \ + build="33" \ org.opencontainers.image.title="Nagios" \ org.opencontainers.image.description="Nagios, the Industry Standard In IT Infrastructure Monitoring" \ org.opencontainers.image.vendor="Nagios" \ @@ -199,7 +199,7 @@ LABEL name="Nagios" \ org.opencontainers.image.url="https://hub.docker.com/r/manios/nagios" \ org.opencontainers.image.source="https://github.com/manios/docker-nagios" \ org.opencontainers.image.documentation="https://github.com/manios/docker-nagios/blob/master/README.md" \ - org.opencontainers.image.version="33-snapshot" + org.opencontainers.image.version="33" RUN mkdir -p ${NAGIOS_HOME} && \ mkdir -p /orig/apache2 diff --git a/README.md b/README.md index d2055bf..510bef1 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Build Status: ## Supported tags and respective `Dockerfile` links -* `4.5.10`, `4.5`, `latest` [(4.5.10/Dockerfile)](https://github.com/manios/docker-nagios/blob/master/Dockerfile) +* `4.5.11`, `4.5`, `latest` [(4.5.11/Dockerfile)](https://github.com/manios/docker-nagios/blob/master/Dockerfile) For more information about the image versions you may refer to the [CHANGELOG](https://github.com/manios/docker-nagios/blob/master/CHANGELOG.md) From a4227c8de4c7ac5b83aa432911e5e62a3157549d Mon Sep 17 00:00:00 2001 From: Christos Manios Date: Thu, 26 Mar 2026 17:19:17 +0200 Subject: [PATCH 49/55] Upgrade to Nagios Core to 4.5.12 (#100) --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index ced64ad..fef00f5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,7 +18,7 @@ ENV NAGIOS_HOME=/opt/nagios \ NAGIOS_FQDN=nagios.example.com \ NAGIOSADMIN_USER=nagiosadmin \ NAGIOSADMIN_PASS=nagios \ - NAGIOS_VERSION=4.5.11 \ + NAGIOS_VERSION=4.5.12 \ NAGIOS_PLUGINS_VERSION=2.4.12 \ NRPE_VERSION=4.1.3 \ APACHE_LOCK_DIR=/var/run \ From 952e22f7ac47cbe7f73eca8688ec6653720ac3da Mon Sep 17 00:00:00 2001 From: Christos Manios Date: Thu, 26 Mar 2026 17:19:39 +0200 Subject: [PATCH 50/55] Release build 34 --- CHANGELOG.md | 12 ++++++++++++ Dockerfile | 4 ++-- README.md | 2 +- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 994ad30..d9338a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,18 @@ This Docker image contains more than one software (Nagios, Nagios plugins, NRPE, Apache HTTPD, etc.) with different versions. Hence we decided to name the releases with the naming `Build - ` which will have an incremental unsigned integer. In this document we will describe the contents of every image in every build. +## Build 34 (2026-03-26) + +* Nagios core: v4.5.12 +* Nagios plugins: v2.4.12 +* NRPE: 4.1.3 +* Alpine: + * 3.23.2: `amd64`, `i386`, `arm64`,`arm/v6`, `arm/v7` + +### Features + +* Upgrade to Nagios Core `4.5.12`. ([#100](https://github.com/manios/docker-nagios/issues/100)) + ## Build 33 (2026-01-15) * Nagios core: v4.5.11 diff --git a/Dockerfile b/Dockerfile index fef00f5..6d17c92 100644 --- a/Dockerfile +++ b/Dockerfile @@ -190,7 +190,7 @@ LABEL name="Nagios" \ nrpeVersion=$NRPE_VERSION \ homepage="https://www.nagios.com/" \ maintainer="Christos Manios " \ - build="33" \ + build="34" \ org.opencontainers.image.title="Nagios" \ org.opencontainers.image.description="Nagios, the Industry Standard In IT Infrastructure Monitoring" \ org.opencontainers.image.vendor="Nagios" \ @@ -199,7 +199,7 @@ LABEL name="Nagios" \ org.opencontainers.image.url="https://hub.docker.com/r/manios/nagios" \ org.opencontainers.image.source="https://github.com/manios/docker-nagios" \ org.opencontainers.image.documentation="https://github.com/manios/docker-nagios/blob/master/README.md" \ - org.opencontainers.image.version="33" + org.opencontainers.image.version="34" RUN mkdir -p ${NAGIOS_HOME} && \ mkdir -p /orig/apache2 diff --git a/README.md b/README.md index 510bef1..4e01769 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Build Status: ## Supported tags and respective `Dockerfile` links -* `4.5.11`, `4.5`, `latest` [(4.5.11/Dockerfile)](https://github.com/manios/docker-nagios/blob/master/Dockerfile) +* `4.5.12`, `4.5`, `latest` [(4.5.12/Dockerfile)](https://github.com/manios/docker-nagios/blob/master/Dockerfile) For more information about the image versions you may refer to the [CHANGELOG](https://github.com/manios/docker-nagios/blob/master/CHANGELOG.md) From 1ccea2191cbcb067e3f2dca7a46c6f897f2dc806 Mon Sep 17 00:00:00 2001 From: Christos Manios Date: Wed, 1 Apr 2026 14:25:51 +0300 Subject: [PATCH 51/55] Upgrade to Nagios Plugins 2.5.0 (#101) --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6d17c92..8d32bda 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,7 +19,7 @@ ENV NAGIOS_HOME=/opt/nagios \ NAGIOSADMIN_USER=nagiosadmin \ NAGIOSADMIN_PASS=nagios \ NAGIOS_VERSION=4.5.12 \ - NAGIOS_PLUGINS_VERSION=2.4.12 \ + NAGIOS_PLUGINS_VERSION=2.5 \ NRPE_VERSION=4.1.3 \ APACHE_LOCK_DIR=/var/run \ APACHE_LOG_DIR=/var/log/apache2 @@ -190,7 +190,7 @@ LABEL name="Nagios" \ nrpeVersion=$NRPE_VERSION \ homepage="https://www.nagios.com/" \ maintainer="Christos Manios " \ - build="34" \ + build="35-snapshot" \ org.opencontainers.image.title="Nagios" \ org.opencontainers.image.description="Nagios, the Industry Standard In IT Infrastructure Monitoring" \ org.opencontainers.image.vendor="Nagios" \ @@ -199,7 +199,7 @@ LABEL name="Nagios" \ org.opencontainers.image.url="https://hub.docker.com/r/manios/nagios" \ org.opencontainers.image.source="https://github.com/manios/docker-nagios" \ org.opencontainers.image.documentation="https://github.com/manios/docker-nagios/blob/master/README.md" \ - org.opencontainers.image.version="34" + org.opencontainers.image.version="35-snapshot" RUN mkdir -p ${NAGIOS_HOME} && \ mkdir -p /orig/apache2 From b0164053a36b2224debb308b150a9127c12e398c Mon Sep 17 00:00:00 2001 From: Christos Manios Date: Wed, 1 Apr 2026 14:29:04 +0300 Subject: [PATCH 52/55] Release build 35 --- CHANGELOG.md | 12 ++++++++++++ Dockerfile | 4 ++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d9338a0..0df6b6f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,18 @@ This Docker image contains more than one software (Nagios, Nagios plugins, NRPE, Apache HTTPD, etc.) with different versions. Hence we decided to name the releases with the naming `Build - ` which will have an incremental unsigned integer. In this document we will describe the contents of every image in every build. +## Build 35 (2026-04-03) + +* Nagios core: v4.5.12 +* Nagios plugins: v2.5.0 +* NRPE: 4.1.3 +* Alpine: + * 3.23.2: `amd64`, `i386`, `arm64`,`arm/v6`, `arm/v7` + +### Features + +* Upgrade to Nagios Plugins to `2.5.0`. ([#101](https://github.com/manios/docker-nagios/issues/101)) + ## Build 34 (2026-03-26) * Nagios core: v4.5.12 diff --git a/Dockerfile b/Dockerfile index 8d32bda..8675b5e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -190,7 +190,7 @@ LABEL name="Nagios" \ nrpeVersion=$NRPE_VERSION \ homepage="https://www.nagios.com/" \ maintainer="Christos Manios " \ - build="35-snapshot" \ + build="35" \ org.opencontainers.image.title="Nagios" \ org.opencontainers.image.description="Nagios, the Industry Standard In IT Infrastructure Monitoring" \ org.opencontainers.image.vendor="Nagios" \ @@ -199,7 +199,7 @@ LABEL name="Nagios" \ org.opencontainers.image.url="https://hub.docker.com/r/manios/nagios" \ org.opencontainers.image.source="https://github.com/manios/docker-nagios" \ org.opencontainers.image.documentation="https://github.com/manios/docker-nagios/blob/master/README.md" \ - org.opencontainers.image.version="35-snapshot" + org.opencontainers.image.version="35" RUN mkdir -p ${NAGIOS_HOME} && \ mkdir -p /orig/apache2 From 832f18de01ee944d5a6ae8cc9a4f4c86fdd73d42 Mon Sep 17 00:00:00 2001 From: Christos Manios Date: Fri, 29 May 2026 16:58:22 +0300 Subject: [PATCH 53/55] Upgrade to Nagios Core to 4.5.13 (#102) --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8675b5e..cebccc4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,7 +18,7 @@ ENV NAGIOS_HOME=/opt/nagios \ NAGIOS_FQDN=nagios.example.com \ NAGIOSADMIN_USER=nagiosadmin \ NAGIOSADMIN_PASS=nagios \ - NAGIOS_VERSION=4.5.12 \ + NAGIOS_VERSION=4.5.13 \ NAGIOS_PLUGINS_VERSION=2.5 \ NRPE_VERSION=4.1.3 \ APACHE_LOCK_DIR=/var/run \ @@ -190,7 +190,7 @@ LABEL name="Nagios" \ nrpeVersion=$NRPE_VERSION \ homepage="https://www.nagios.com/" \ maintainer="Christos Manios " \ - build="35" \ + build="36-snapshot" \ org.opencontainers.image.title="Nagios" \ org.opencontainers.image.description="Nagios, the Industry Standard In IT Infrastructure Monitoring" \ org.opencontainers.image.vendor="Nagios" \ @@ -199,7 +199,7 @@ LABEL name="Nagios" \ org.opencontainers.image.url="https://hub.docker.com/r/manios/nagios" \ org.opencontainers.image.source="https://github.com/manios/docker-nagios" \ org.opencontainers.image.documentation="https://github.com/manios/docker-nagios/blob/master/README.md" \ - org.opencontainers.image.version="35" + org.opencontainers.image.version="36-snapshot" RUN mkdir -p ${NAGIOS_HOME} && \ mkdir -p /orig/apache2 From 6c680597aacc87d068701443988db7be83b80452 Mon Sep 17 00:00:00 2001 From: Christos Manios Date: Fri, 12 Jun 2026 12:01:07 +0300 Subject: [PATCH 54/55] Release build 36 --- CHANGELOG.md | 12 ++++++++++++ Dockerfile | 4 ++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0df6b6f..ab8b621 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,18 @@ This Docker image contains more than one software (Nagios, Nagios plugins, NRPE, Apache HTTPD, etc.) with different versions. Hence we decided to name the releases with the naming `Build - ` which will have an incremental unsigned integer. In this document we will describe the contents of every image in every build. +## Build 36 (2026-06-12) + +* Nagios core: v4.5.13 +* Nagios plugins: v2.5.0 +* NRPE: 4.1.3 +* Alpine: + * 3.23.4: `amd64`, `i386`, `arm64`,`arm/v6`, `arm/v7` + +### Features + +* Upgrade to Nagios Core `4.5.13`. ([#102](https://github.com/manios/docker-nagios/issues/102)) + ## Build 35 (2026-04-03) * Nagios core: v4.5.12 diff --git a/Dockerfile b/Dockerfile index cebccc4..48fe474 100644 --- a/Dockerfile +++ b/Dockerfile @@ -190,7 +190,7 @@ LABEL name="Nagios" \ nrpeVersion=$NRPE_VERSION \ homepage="https://www.nagios.com/" \ maintainer="Christos Manios " \ - build="36-snapshot" \ + build="36" \ org.opencontainers.image.title="Nagios" \ org.opencontainers.image.description="Nagios, the Industry Standard In IT Infrastructure Monitoring" \ org.opencontainers.image.vendor="Nagios" \ @@ -199,7 +199,7 @@ LABEL name="Nagios" \ org.opencontainers.image.url="https://hub.docker.com/r/manios/nagios" \ org.opencontainers.image.source="https://github.com/manios/docker-nagios" \ org.opencontainers.image.documentation="https://github.com/manios/docker-nagios/blob/master/README.md" \ - org.opencontainers.image.version="36-snapshot" + org.opencontainers.image.version="36" RUN mkdir -p ${NAGIOS_HOME} && \ mkdir -p /orig/apache2 From f2a266a0b854dc161dd5b3e847723f4cf00f2188 Mon Sep 17 00:00:00 2001 From: Christos Manios Date: Fri, 12 Jun 2026 12:07:04 +0300 Subject: [PATCH 55/55] Update readme for Nagios version 4.5.13 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4e01769..aa8295a 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Build Status: ## Supported tags and respective `Dockerfile` links -* `4.5.12`, `4.5`, `latest` [(4.5.12/Dockerfile)](https://github.com/manios/docker-nagios/blob/master/Dockerfile) +* `4.5.13`, `4.5`, `latest` [(4.5.13/Dockerfile)](https://github.com/manios/docker-nagios/blob/master/Dockerfile) For more information about the image versions you may refer to the [CHANGELOG](https://github.com/manios/docker-nagios/blob/master/CHANGELOG.md)