FROM debian:buster-slim RUN apt-get update; apt-get install -y libnet-imap-client-perl libnet-imap-perl \ libcrypt-openssl-bignum-perl libcrypt-openssl-dsa-perl libcrypt-openssl-ec-perl \ libcrypt-openssl-pkcs10-perl libcrypt-openssl-pkcs12-perl libcrypt-openssl-random-perl \ libcrypt-openssl-rsa-perl libnet-smtp-ssl-perl libnet-smtp-tls-perl libnet-smtps-perl \ libnet-imap-client-perl zabbix-agent libmail-imapclient-perl curl jq && \ rm -rf /var/lib/apt/lists/* COPY ./check_email_delivery-0.7.1b/check_* /usr/local/bin/ COPY ./check_email_delivery-0.7.1b/imap_* /usr/local/bin/ COPY check_email_send_delivery.sh /usr/local/bin/check_email_send_delivery.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 export RUNNING_ON_DOCKER='TRUE' 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