This commit is contained in:
Michael Grote 2022-07-26 15:33:10 +02:00
parent 3da2ec240b
commit b2e2a0dc25

View file

@ -3,30 +3,29 @@ FROM ubuntu:20.04
# install and configure munin # install and configure munin
# hadolint ignore=DL3008 # hadolint ignore=DL3008
RUN apt-get update -qq \ RUN apt-get update -qq \
&& RUNLEVEL=1 \
DEBIAN_FRONTEND=noninteractive \ DEBIAN_FRONTEND=noninteractive \
apt-get install -y -qq cron munin nginx apache2 wget libapache2-mod-fcgid libcgi-fast-perl ssmtp mailutils curl tzdata autoconf --no-install-recommends \ apt-get install -y -qq cron munin nginx apache2 wget libapache2-mod-fcgid libcgi-fast-perl ssmtp mailutils curl tzdata autoconf --no-install-recommends \
&& apt-get clean \ && apt-get clean \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
RUN cp /etc/munin/apache24.conf /etc/apache2/sites-available/000-default.conf \ RUN (cp /etc/munin/apache24.conf /etc/apache2/sites-available/000-default.conf) \
&& sed -i 's/^Alias.*/Alias \/ \/var\/cache\/munin\/www\//g' /etc/apache2/sites-available/000-default.conf \ && (sed -i 's/^Alias.*/Alias \/ \/var\/cache\/munin\/www\//g' /etc/apache2/sites-available/000-default.conf) \
&& sed -i 's/Allow from .*/Satisfy Any/g' /etc/apache2/sites-available/000-default.conf \ && (sed -i 's/Allow from .*/Satisfy Any/g' /etc/apache2/sites-available/000-default.conf) \
&& sed -i 's/Order allow,deny.*/Allow from all/g' /etc/apache2/sites-available/000-default.conf \ && (sed -i 's/Order allow,deny.*/Allow from all/g' /etc/apache2/sites-available/000-default.conf) \
&& mkdir -p /var/run/munin \ && (mkdir -p /var/run/munin) \
&& chown -R munin:munin /var/run/munin \ && (chown -R munin:munin /var/run/munin) \
&& chfn -f 'munin' root \ && (chfn -f 'munin' root) \
&& /usr/sbin/a2enmod fcgid && (/usr/sbin/a2enmod fcgid)
COPY 000-default.conf /etc/apache2/sites-available/000-default.conf COPY (000-default.conf /etc/apache2/sites-available/000-default.conf)
COPY logrotate-munin /etc/logrotate.d/munin COPY (logrotate-munin /etc/logrotate.d/munin)
COPY munin.conf /etc/munin/munin.conf COPY (munin.conf /etc/munin/munin.conf)
COPY ssmtp.conf /etc/ssmtp/ssmtp.conf COPY (ssmtp.conf /etc/ssmtp/ssmtp.conf)
COPY revaliases /etc/ssmtp/revaliases COPY (revaliases /etc/ssmtp/revaliases)
COPY munin_mail.conf /etc/munin/munin-conf.d/munin_mail.conf COPY (munin_mail.conf /etc/munin/munin-conf.d/munin_mail.conf)
COPY slack_munin.sh /usr/local/bin/notify_slack_munin COPY (slack_munin.sh /usr/local/bin/notify_slack_munin)
RUN chmod +x /usr/local/bin/notify_slack_munin RUN (chmod +x /usr/local/bin/notify_slack_munin)
COPY munin_slack.conf /etc/munin/munin-conf.d/munin_slack.conf COPY (munin_slack.conf /etc/munin/munin-conf.d/munin_slack.conf)
# copy launcher # copy launcher
COPY run.sh /usr/local/bin/run COPY run.sh /usr/local/bin/run