zabbix-helpers/check_dns_records/Dockerfile

23 lines
654 B
Docker
Executable File

FROM debian:buster-slim
RUN apt update -y \
&& apt install -y zabbix-agent dnsutils curl jq && \
rm -rf /var/lib/apt/lists/*
COPY zabbix_dns_records_check.sh /usr/local/bin/zabbix_dns_records_check.sh
COPY zabbix_create_host.sh /usr/local/bin/zabbix_create_host.sh
COPY run.sh /usr/local/bin/run.sh
ADD zabbix_jrpc_files/* /usr/local/lib/
COPY zabbix_templates/* /usr/local/lib/
RUN chmod 755 /usr/local/bin/*
RUN sed -i -e 's/^Server=127.0.0.1$/Server=${ZABBIX_SERVER}/' /etc/zabbix/zabbix_agentd.conf; \
sed -i -e 's/^ServerActive=127.0.0.1$/ServerActive=${ZABBIX_SERVER}/' /etc/zabbix/zabbix_agentd.conf
CMD /usr/local/bin/run.sh