-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathDockerfile
38 lines (31 loc) · 1.57 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
FROM ubuntu:24.04
LABEL org.opencontainers.image.authors="[email protected]"
LABEL org.opencontainers.image.source="https://github.com/ethersys/ethersys-docker-munin"
LABEL org.opencontainers.image.description="Official Munin image with Docker binaries"
# install and configure munin
RUN apt-get update -qq && RUNLEVEL=1 DEBIAN_FRONTEND=noninteractive \
apt-get install -y -qq cron munin nginx apache2 wget libapache2-mod-fcgid libcgi-fast-perl msmtp msmtp-mta mailutils curl tzdata autoconf
RUN (cp /etc/munin/apache24.conf /etc/apache2/sites-available/000-default.conf)
RUN (sed -i 's/^Alias.*/Alias \/ \/var\/cache\/munin\/www\//g' /etc/apache2/sites-available/000-default.conf)
RUN (sed -i 's/Allow from .*/Satisfy Any/g' /etc/apache2/sites-available/000-default.conf)
RUN (sed -i 's/Order allow,deny.*/Allow from all/g' /etc/apache2/sites-available/000-default.conf)
RUN (mkdir -p /var/run/munin && chown -R munin:munin /var/run/munin)
RUN (chfn -f 'munin' root)
RUN (/usr/sbin/a2enmod fcgid)
COPY 000-default.conf /etc/apache2/sites-available/000-default.conf
COPY logrotate-munin /etc/logrotate.d/munin
COPY munin.conf /etc/munin/munin.conf
COPY msmtprc /etc/msmtprc
COPY munin_mail.conf /etc/munin/munin-conf.d/munin_mail.conf
COPY slack_munin.sh /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 launcher
ADD run.sh /usr/local/bin/run
RUN chmod +x /usr/local/bin/run
# persist
VOLUME /var/lib/munin
VOLUME /var/log/munin
VOLUME /var/cache/munin
# launcher
CMD ["/usr/local/bin/run"]