forked from scline/docker-cacti
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
72 lines (62 loc) · 1.81 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
62
63
64
65
66
67
68
69
70
71
72
FROM centos:7
MAINTAINER Sean Cline <[email protected]>
## --- SUPPORTING FILES ---
COPY cacti /cacti_install
## --- CACTI ---
RUN \
rpm --rebuilddb && yum clean all && \
yum update -y && \
yum install -y \
rrdtool net-snmp net-snmp-utils cronie php-ldap php-devel mysql php \
ntp bison php-cli php-mysql php-common php-mbstring php-snmp curl \
php-gd openssl openldap mod_ssl php-pear net-snmp-libs php-pdo \
autoconf automake gcc gzip help2man libtool make net-snmp-devel \
m4 libmysqlclient-devel libmysqlclient openssl-devel dos2unix wget \
sendmail mariadb-devel which && \
yum clean all
## --- CRON ---
# Fix cron issues - https://github.com/CentOS/CentOS-Dockerfiles/issues/31
RUN sed -i '/session required pam_loginuid.so/d' /etc/pam.d/crond
## --- SERVICE CONFIGS ---
COPY configs /template_configs
## --- SETTINGS/EXTRAS ---
COPY plugins /cacti_install/plugins
COPY templates /templates
COPY settings /settings
## --- SCRIPTS ---
COPY upgrade.sh /upgrade.sh
RUN chmod +x /upgrade.sh
COPY restore.sh /restore.sh
RUN chmod +x /restore.sh
COPY backup.sh /backup.sh
RUN chmod +x /backup.sh
RUN mkdir /backups
RUN mkdir /cacti
RUN mkdir /spine
## -- MISC SETUP --
RUN echo "ServerName localhost" > /etc/httpd/conf.d/fqdn.conf
## --- ENV ---
ENV \
DB_NAME=cacti \
DB_USER=cactiuser \
DB_PASS=cactipassword \
DB_HOST=localhost \
DB_PORT=3306 \
RDB_NAME=cacti \
RDB_USER=cactiuser \
RDB_PASS=cactipassword \
RDB_HOST=localhost \
RDB_PORT=3306 \
BACKUP_RETENTION=7 \
BACKUP_TIME=0 \
SNMP_COMMUNITY=public \
REMOTE_POLLER=0 \
INITIALIZE_DB=0 \
INITIALIZE_INFLUX=0 \
TZ=UTC \
PHP_MEMORY_LIMIT=800M \
PHP_MAX_EXECUTION_TIME=60
## --- Start ---
COPY start.sh /start.sh
CMD ["/start.sh"]
EXPOSE 80 443