diff --git a/Dockerfile b/Dockerfile index 5f01a7c..19d808f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM rockylinux:9.0 +FROM rockylinux/rockylinux:9.4 LABEL org.opencontainers.image.authors="Sean Cline " @@ -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 @@ -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 && \ diff --git a/cacti/cacti-1.2.25.tar.gz b/cacti/cacti-1.2.25.tar.gz deleted file mode 100644 index ad72e9e..0000000 Binary files a/cacti/cacti-1.2.25.tar.gz and /dev/null differ diff --git a/cacti/cacti-spine-1.2.25.tar.gz b/cacti/cacti-spine-1.2.25.tar.gz deleted file mode 100644 index bafd872..0000000 Binary files a/cacti/cacti-spine-1.2.25.tar.gz and /dev/null differ diff --git a/start.sh b/start.sh index b02d3ca..71a820a 100755 --- a/start.sh +++ b/start.sh @@ -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 @@ -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." diff --git a/upgrade.sh b/upgrade.sh index 79028c6..ef72045 100644 --- a/upgrade.sh +++ b/upgrade.sh @@ -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