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 yum -y install epel-release RUN yum -y install http://yum.opennms.org/repofiles/opennms-repo-stable-rhel7.noarch.rpm RUN yum -y install wget httpd php php-opcache php-mysqlnd php-gd php-posix php-pear cronie net-snmp net-snmp-utils fping mariadb-server mariadb rrdtool ipmitool graphviz ImageMagick php-json python3-PyMySQL libsodium libsodium-devel php-devel make 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 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' /etc/httpd/conf/httpd.conf RUN sed -i -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 EXPOSE 80 CMD ["/usr/bin/supervisord", "-n"]