Add an entrypoint to configure ssmtp
This commit is contained in:
parent
88549ed7d2
commit
87eb526eb5
@ -1,6 +1,7 @@
|
|||||||
FROM alpine
|
FROM alpine
|
||||||
|
|
||||||
RUN apk add --no-cache \
|
RUN apk add --no-cache \
|
||||||
|
ca-certificates \
|
||||||
nagios \
|
nagios \
|
||||||
nagios-plugins \
|
nagios-plugins \
|
||||||
nagios-plugins-dig \
|
nagios-plugins-dig \
|
||||||
@ -14,8 +15,12 @@ RUN apk add --no-cache \
|
|||||||
nagios-plugins-ssh \
|
nagios-plugins-ssh \
|
||||||
nagios-plugins-ssl_validity \
|
nagios-plugins-ssl_validity \
|
||||||
nagios-web \
|
nagios-web \
|
||||||
nrpe-plugin
|
nrpe-plugin \
|
||||||
|
ssmtp
|
||||||
|
|
||||||
USER nagios
|
USER nagios
|
||||||
|
|
||||||
|
COPY entrypoint.sh /docker-entrypoint.sh
|
||||||
|
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||||
|
|
||||||
CMD ["/usr/sbin/nagios", "/etc/nagios/nagios.cfg"]
|
CMD ["/usr/sbin/nagios", "/etc/nagios/nagios.cfg"]
|
||||||
|
5
entrypoint.sh
Executable file
5
entrypoint.sh
Executable file
@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
[ -n "${MAILER_HOST}" ] && sed -r -i "/^mailhub=/s/.*/mailhub=${MAILER_HOST}/" /etc/ssmtp/ssmtp.conf
|
||||||
|
|
||||||
|
exec $@
|
Loading…
Reference in New Issue
Block a user