|
@@ -1,52 +0,0 @@
|
1
|
|
-FROM debian:stretch
|
2
|
|
-
|
3
|
|
-MAINTAINER Robin Thoni <robin@rthoni.com>
|
4
|
|
-
|
5
|
|
-RUN apt-get update && apt-get -y install\
|
6
|
|
- wget &&\
|
7
|
|
- apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
8
|
|
-
|
9
|
|
-ARG ZABBIX_VERSION=4.0
|
10
|
|
-
|
11
|
|
-RUN sed -i 's/main/main non-free/' /etc/apt/sources.list
|
12
|
|
-
|
13
|
|
-RUN if [ "$(uname -m)" = "x86_64" ]; then echo -n "debian"; else echo -n "raspbian"; fi > /tmp/distrib &&\
|
14
|
|
- 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 &&\
|
15
|
|
- rm /tmp/distrib &&\
|
16
|
|
- dpkg -i /tmp/zabbix.deb
|
17
|
|
-
|
18
|
|
-RUN apt-get update && apt-get -y install\
|
19
|
|
- zabbix-server-pgsql zabbix-get snmp snmp-mibs-downloader snmptrapd\
|
20
|
|
- snmp &&\
|
21
|
|
- apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
22
|
|
-
|
23
|
|
-RUN chown -R zabbix:zabbix /etc/zabbix &&\
|
24
|
|
- mkdir -p /var/run/zabbix &&\
|
25
|
|
- chown zabbix:zabbix /var/run/zabbix/
|
26
|
|
-
|
27
|
|
-RUN rm -rf /var/log/* &&\
|
28
|
|
- mkdir -p /var/log/zabbix/ &&\
|
29
|
|
- chown zabbix:zabbix /var/log/zabbix/ &&\
|
30
|
|
- ln -s /dev/stdout /var/log/zabbix/zabbix_server.log
|
31
|
|
-
|
32
|
|
-RUN chmod u+s /usr/bin/fping &&\
|
33
|
|
- chmod u+s /usr/bin/fping6
|
34
|
|
-
|
35
|
|
-COPY ./zabbix_server.conf /etc/zabbix/zabbix_server.conf
|
36
|
|
-
|
37
|
|
-COPY ./vars-vars /etc/vars-vars
|
38
|
|
-
|
39
|
|
-COPY ./vars-files /etc/vars-files
|
40
|
|
-
|
41
|
|
-COPY ./run.sh /run.sh
|
42
|
|
-
|
43
|
|
-COPY ./certs/* /etc/zabbix/certs/
|
44
|
|
-
|
45
|
|
-RUN chown zabbix:zabbix /etc/zabbix/certs/* &&\
|
46
|
|
- chmod 400 /etc/zabbix/certs/*
|
47
|
|
-
|
48
|
|
-EXPOSE 80
|
49
|
|
-
|
50
|
|
-USER zabbix
|
51
|
|
-
|
52
|
|
-CMD ["/run.sh"]
|