FROM centos:8 LABEL description="Observium 19.8.10000 on CentOS8" LABEL maintainer="xpk@headdesk.me" LABEL notes="Initial user/pass = observium/observium. Mount /opt/observium and /var/lib/mysql on persistent storage." LABEL exposed-port="80" LABEL git="https://xpk.headdesk.me/git/centos8-observium" ENV container docker RUN dnf -y install epel-release RUN dnf install -y https://rpms.remirepo.net/enterprise/remi-release-8.rpm dnf module enable php:remi-8.1 -y RUN dnf -y install http://yum.opennms.org/repofiles/opennms-repo-stable-rhel7.noarch.rpm #RUN dnf -y install wget httpd php php-opcache php-mysqlnd php-gd php-posix php-pear cronie net-snmp net-snmp-utils fping mariadb rrdtool ipmitool graphviz ImageMagick php-json python3-PyMySQL libsodium libsodium-devel php-devel make supervisor --nobest RUN dnf -y install wget httpd php php-opcache php-mysqlnd php-gd php-sodium php-posix php-pear cronie net-snmp net-snmp-utils fping mariadb rrdtool ipmitool graphviz ImageMagick php-json python3-PyMySQL libsodium php-devel supervisor --nobest #RUN mysql_install_db -u mysql #RUN pecl install libsodium; echo "extension=sodium.so" > /etc/php.d/sodium.ini RUN ln -s /usr/bin/python3 /usr/bin/python; mkdir -p /opt/observium /run/supervisor /run/php-fpm WORKDIR /opt/observium # RUN wget -qq -O- http://www.observium.org/observium-community-latest.tar.gz | tar zxf - --strip-components=1 # for upgrade, see upgrade.md COPY config.php /opt/observium/config.php COPY observium.ini /etc/supervisord.d/observium.ini COPY crontab /var/spool/cron/root #RUN mkdir -p /opt/observium/rrd /opt/observium/logs; chown apache:apache /opt/observium/{rrd,logs} RUN sed -i -e 's@/var/www/html@/opt/observium/html@g' -e 's/AllowOverride.*/AllowOverride All/g' /etc/httpd/conf/httpd.conf #ADD initialise.sh /opt/observium/initialise.sh #RUN chmod 755 /opt/observium/initialise.sh && /opt/observium/initialise.sh # Add static route RUN ip route add 192.168.167.0/24 via 192.168.86.2 EXPOSE 80 CMD ["/usr/bin/supervisord", "-n"]