-
Notifications
You must be signed in to change notification settings - Fork 57
/
Dockerfile
83 lines (72 loc) · 2.38 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
73
74
75
76
77
78
79
80
81
82
83
FROM rockylinux:9.0
LABEL org.opencontainers.image.authors="Sean Cline <[email protected]>"
EXPOSE 80 443
## --- 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 \
CACTI_URL_PATH=cacti \
BACKUP_RETENTION=7 \
BACKUP_TIME=0 \
REMOTE_POLLER=0 \
INITIALIZE_DB=0 \
TZ=UTC \
PHP_MEMORY_LIMIT=800M \
PHP_MAX_EXECUTION_TIME=60 \
PHP_SNMP=1
CMD ["/start.sh"]
## --- Start ---
COPY start.sh /start.sh
## --- SUPPORTING FILES ---
#COPY cacti /cacti_install
# --- GET LATEST VERSION
ADD http://files.cacti.net/spine/cacti-spine-latest.tar.gz /cacti_install/cacti-spine-latest.tar.gz
ADD https://files.cacti.net/cacti/linux/cacti-latest.tar.gz /cacti_install/cacti-latest.tar.gz
## --- SERVICE CONFIGS ---
COPY configs /template_configs
COPY configs/crontab /etc/crontab
## --- SETTINGS/EXTRAS ---
COPY plugins /cacti_install/plugins
COPY templates /templates
COPY settings /settings
## --- SCRIPTS ---
COPY upgrade.sh /upgrade.sh
COPY restore.sh /restore.sh
COPY backup.sh /backup.sh
## --- UPDATE OS, INSTALL EPEL, PHP EXTENTIONS, CACTI/SPINE Requirements, Other/Requests ---
RUN \
chmod +x /upgrade.sh && \
chmod +x /restore.sh && \
chmod +x /backup.sh && \
chmod u+s /bin/ping && \
chmod g+s /bin/ping && \
mkdir /backups && \
mkdir /cacti && \
mkdir /spine && \
yum update -y && \
yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm && \
yum install -y dnf-plugins-core && \
yum config-manager --set-enabled crb && \
yum install -y \
php php-xml php-session php-sockets php-ldap php-gd \
php-json php-mysqlnd php-gmp php-mbstring php-posix \
php-snmp php-intl php-common php-cli php-devel php-pear \
php-pdo && \
yum install -y \
rrdtool net-snmp net-snmp-utils cronie mariadb autoconf \
bison openssl openldap mod_ssl net-snmp-libs automake \
gcc gzip libtool make net-snmp-devel dos2unix m4 which \
openssl-devel mariadb-devel sendmail curl wget help2man perl-libwww-perl && \
yum clean all && \
rm -rf /var/cache/yum/* && \
chmod 0644 /etc/crontab && \
echo "ServerName localhost" > /etc/httpd/conf.d/fqdn.conf && \
/usr/libexec/httpd-ssl-gencerts