forked from bhuisgen/docker-zabbix-coreos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
61 lines (50 loc) · 1.48 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
FROM debian:jessie
MAINTAINER Boris HUISGEN <[email protected]>
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && \
apt-get -y install locales && \
dpkg-reconfigure locales && \
locale-gen C.UTF-8 && \
/usr/sbin/update-locale LANG=C.UTF-8 && \
echo 'en_US.UTF-8 UTF-8' >> /etc/locale.gen && \
locale-gen
ENV LC_ALL C.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US.UTF-8
RUN apt-get update && \
apt-get -y install \
ucf \
procps \
iproute \
supervisor
COPY etc/supervisor/ /etc/supervisor/
RUN apt-get update && \
apt-get -y install --no-install-recommends \
cron \
curl \
jq \
libcurl3-gnutls \
libldap-2.4-2 \
netcat-openbsd \
pciutils \
sudo
COPY files/zabbix-agent_2.2.7+dfsg-1.1_amd64.deb /root/
RUN dpkg -i /root/zabbix-agent_2.2.7+dfsg-1.1_amd64.deb
COPY etc/zabbix/ /etc/zabbix/
RUN mkdir -p /var/lib/zabbix && \
chmod 700 /var/lib/zabbix && \
chown zabbix:zabbix /var/lib/zabbix && \
usermod -d /var/lib/zabbix zabbix && \
usermod -a -G adm zabbix
COPY etc/sudoers.d/zabbix etc/sudoers.d/zabbix
RUN chmod 400 /etc/sudoers.d/zabbix
COPY etc/zabbix/crontab /var/spool/cron/crontabs/zabbix
RUN chmod 600 /var/spool/cron/crontabs/zabbix && \
chown zabbix:crontab /var/spool/cron/crontabs/zabbix
RUN apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
COPY run.sh /
RUN chmod +x /run.sh
EXPOSE 10050
ENTRYPOINT ["/run.sh"]
CMD [""]