mirror of
https://github.com/manios/docker-nagios.git
synced 2026-07-18 00:45:14 +00:00
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
This commit is contained in:
parent
164ef4d6ad
commit
e4adfa6728
2 changed files with 13 additions and 28 deletions
26
.github/workflows/github-build.yml
vendored
26
.github/workflows/github-build.yml
vendored
|
|
@ -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 }}
|
||||
|
|
|
|||
15
Dockerfile
15
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 <maniopaido@gmail.com>" \
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue