您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

Dockerfile 1.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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. COPY ./certs/* /etc/zabbix/certs/
  30. RUN chown zabbix:zabbix /etc/zabbix/certs/* &&\
  31. chmod 400 /etc/zabbix/certs/*
  32. EXPOSE 80
  33. USER zabbix
  34. CMD ["/run.sh"]