Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 6 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM rockylinux:9.0
FROM rockylinux/rockylinux:9.4

LABEL org.opencontainers.image.authors="Sean Cline <smcline06@gmail.com>"

Expand Down Expand Up @@ -26,18 +26,11 @@ ENV \
PHP_MAX_EXECUTION_TIME=60 \
PHP_SNMP=1

CMD ["/start.sh"]
CMD ["sh", "/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
Expand All @@ -62,20 +55,20 @@ RUN \
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-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 && \
openssl-devel sendmail wget perl-libwww-perl && \
wget --no-check-certificate --user-agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36" -q 'http://www.cacti.net/downloads/cacti-latest.tar.gz' -O /cacti_install/cacti-latest.tar.gz && \
wget --no-check-certificate --user-agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36" -q 'http://www.cacti.net/downloads/spine/cacti-spine-latest.tar.gz' -O /cacti_install/cacti-spine-latest.tar.gz && \
yum clean all && \
rm -rf /var/cache/yum/* && \
chmod 0644 /etc/crontab && \
Expand Down
Binary file removed cacti/cacti-1.2.25.tar.gz
Binary file not shown.
Binary file removed cacti/cacti-spine-1.2.25.tar.gz
Binary file not shown.
7 changes: 6 additions & 1 deletion start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

export DB_PORT=${DB_PORT:-3306}

# install dnf-plugins-core
echo "$(date +%F_%R) [New Install] install dnf-plugins-core and php-fpm mariadb-devel help2man - new install."
yum update -y
yum install -y dnf-plugins-core php-fpm mariadb-devel help2man

# set server timezone
echo "$(date +%F_%R) [Note] Setting server timezone settings to '${TZ}'"
echo "date.timezone = ${TZ}" >> /etc/php.ini
Expand Down Expand Up @@ -36,7 +41,7 @@ if [ ! -f /cacti/install.lock ]; then
# CACTI BASE INSTALL
echo "$(date +%F_%R) [New Install] Extracting and installing Cacti files to /cacti."
tar -xf /cacti_install/cacti-latest*.tar.gz -C /tmp
mv /tmp/cacti-1*/* /cacti/
mv /tmp/cacti-*/* /cacti/

# SPINE BASE INSTALL
echo "$(date +%F_%R) [New Install] Extracting and installing Spine files to /spine."
Expand Down
4 changes: 2 additions & 2 deletions upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ mkdir /tmp/update/cacti

# download and uncompress cacti
echo "$(date +%F_%R) [Upgrade] Downloading Cacti from $cacti_download_url"
wget --no-check-certificate -qO- $cacti_download_url | tar xzC /tmp/update/cacti
wget --no-check-certificate --user-agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36" -qO $cacti_download_url | tar xzC /tmp/update/cacti

# download and uncompress spine
echo "$(date +%F_%R) [Upgrade] Downloading Spine from $spine_download_url"
wget --no-check-certificate -qO- /tmp/update $spine_download_url | tar xzC /tmp/update/spine/
wget --no-check-certificate --user-agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36" -qO /tmp/update $spine_download_url | tar xzC /tmp/update/spine/

# if not a remote poller, update cacti bits
if [ ${REMOTE_POLLER} != 1 ]; then
Expand Down