rm objects

This commit is contained in:
Kameron Kenny 2024-12-30 11:40:32 -05:00
parent 6ab6efa27d
commit 2048f54b79
2 changed files with 6 additions and 3 deletions

View File

@ -191,8 +191,8 @@ RUN mkdir -p -m 0755 /usr/share/snmp/mibs && \
ln -s ${NAGIOS_HOME}/bin/nagios /usr/local/bin/nagios && \ ln -s ${NAGIOS_HOME}/bin/nagios /usr/local/bin/nagios && \
download-mibs && echo "mibs +ALL" > /etc/snmp/snmp.conf download-mibs && echo "mibs +ALL" > /etc/snmp/snmp.conf
RUN sed -i 's,/bin/mail,/usr/bin/mail,' ${NAGIOS_HOME}/etc/objects/commands.cfg && \ RUN sed -i 's,/bin/mail,/usr/bin/mail,' ${NAGIOS_HOME}/etc/objects/000-commands.cfg && \
sed -i 's,/usr/usr,/usr,' ${NAGIOS_HOME}/etc/objects/commands.cfg sed -i 's,/usr/usr,/usr,' ${NAGIOS_HOME}/etc/objects/000-commands.cfg
RUN cp /etc/services /var/spool/postfix/etc/ && \ RUN cp /etc/services /var/spool/postfix/etc/ && \
echo "smtp_address_preference = ipv4" >> /etc/postfix/main.cf echo "smtp_address_preference = ipv4" >> /etc/postfix/main.cf
@ -249,6 +249,9 @@ RUN pip install speedtest-cli
COPY overlay/opt/nagios/libexec/* ${NAGIOS_HOME}/libexec/ COPY overlay/opt/nagios/libexec/* ${NAGIOS_HOME}/libexec/
#COPY overlay/usr ${NAGIOS_HOME}/usr #COPY overlay/usr ${NAGIOS_HOME}/usr
RUN cd /opt/nagios/etc/objects && \
rm -f commands.cfg contacts.cfg printer.cfg switch.cfg templates.cfg windows.cfg
#VOLUME "${NAGIOS_HOME}/var" "${NAGIOS_HOME}/etc" "/var/log/apache2" "/opt/Custom-Nagios-Plugins" "/opt/nagiosgraph/var" "/opt/nagiosgraph/etc" #VOLUME "${NAGIOS_HOME}/var" "${NAGIOS_HOME}/etc" "/var/log/apache2" "/opt/Custom-Nagios-Plugins" "/opt/nagiosgraph/var" "/opt/nagiosgraph/etc"
CMD [ "/usr/local/bin/start_nagios" ] CMD [ "/usr/local/bin/start_nagios" ]

View File

@ -12,7 +12,7 @@ services:
build: build:
dockerfile: Dockerfile dockerfile: Dockerfile
container_name: nagios container_name: nagios
image: docker-registry1.in.thelinuxpro.net:5000/tlp/nagios:241230.0.2 image: docker-registry1.in.thelinuxpro.net:5000/tlp/nagios:241230.0.3
networks: networks:
infra_dev_net: infra_dev_net:
ipv4_address: 10.99.23.36 ipv4_address: 10.99.23.36