You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Dockerfile 1.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. FROM debian:stretch
  2. MAINTAINER Robin Thoni <robin@rthoni.com>
  3. RUN apt-get update && apt-get -y install\
  4. wget &&\
  5. apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
  6. ARG ZABBIX_VERSION=4.0
  7. RUN sed -i 's/main/main non-free/' /etc/apt/sources.list
  8. RUN if [ "$(uname -m)" = "x86_64" ]; then echo -n "debian"; else echo -n "raspbian"; fi > /tmp/distrib &&\
  9. wget http://repo.zabbix.com/zabbix/${ZABBIX_VERSION}/$(cat /tmp/distrib)/pool/main/z/zabbix-release/zabbix-release_${ZABBIX_VERSION}-2+stretch_all.deb -O /tmp/zabbix.deb &&\
  10. rm /tmp/distrib &&\
  11. dpkg -i /tmp/zabbix.deb
  12. RUN apt-get update && apt-get -y install\
  13. zabbix-server-pgsql zabbix-get snmp snmp-mibs-downloader snmptrapd\
  14. snmp &&\
  15. apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
  16. RUN chown -R zabbix:zabbix /etc/zabbix &&\
  17. mkdir -p /var/run/zabbix &&\
  18. chown zabbix:zabbix /var/run/zabbix/
  19. RUN rm -rf /var/log/* &&\
  20. mkdir -p /var/log/zabbix/ &&\
  21. chown zabbix:zabbix /var/log/zabbix/ &&\
  22. ln -s /dev/stdout /var/log/zabbix/zabbix_server.log
  23. RUN chmod u+s /usr/bin/fping &&\
  24. chmod u+s /usr/bin/fping6
  25. COPY ./zabbix_server.conf /etc/zabbix/zabbix_server.conf
  26. COPY ./vars-vars /etc/vars-vars
  27. COPY ./vars-files /etc/vars-files
  28. COPY ./run.sh /run.sh
  29. EXPOSE 80
  30. USER zabbix
  31. CMD ["/run.sh"]