docker-nagios
docker-nagios copied to clipboard
[DOC] Add documentation to install additional modules on starting nagios
One of the things that is always lacking is "damn, I wish I had package X, or module Y" etc...
It should be documented that you can add packages on nagios startup via a CMD override.
eg, in a docker-compose.yaml
file, we can do something like:
nagios:
container_name: nagios
image: manios/nagios:latest
command: /plugins/bootstrap_nagios
restart: unless-stopped
... rest of config ...
volumes:
- /path/on/host/for/nagios/plugins:/plugins
... any other volumes ...
In the /plugins directory, the bootstrap_nagios
script will contain something like:
#!/bin/sh
set -eu
apk update
apk add python3 py3-requests mariadb-client perl-socket6 perl-net-dns
/usr/local/bin/start_nagios
This installs the alpine packages I need for some of my custom plugins.
This is generally MUCH simpler than forking / publishing your own docker containers with minor tweaks...