hadolint: DL3009 + 3059 + 3020
This commit is contained in:
parent
b9ae9bdf23
commit
9daf2b8232
1 changed files with 15 additions and 10 deletions
25
Dockerfile
25
Dockerfile
|
@ -1,16 +1,21 @@
|
||||||
FROM ubuntu:20.04
|
FROM ubuntu:20.04
|
||||||
|
|
||||||
# install and configure munin
|
# install and configure munin
|
||||||
RUN apt-get update -qq && RUNLEVEL=1 DEBIAN_FRONTEND=noninteractive \
|
RUN apt-get update -qq \
|
||||||
apt-get install -y -qq cron munin nginx apache2 wget libapache2-mod-fcgid libcgi-fast-perl ssmtp mailutils curl tzdata autoconf
|
&& RUNLEVEL=1 \
|
||||||
RUN (cp /etc/munin/apache24.conf /etc/apache2/sites-available/000-default.conf)
|
DEBIAN_FRONTEND=noninteractive \
|
||||||
RUN (sed -i 's/^Alias.*/Alias \/ \/var\/cache\/munin\/www\//g' /etc/apache2/sites-available/000-default.conf)
|
apt-get install -y -qq cron munin nginx apache2 wget libapache2-mod-fcgid libcgi-fast-perl ssmtp mailutils curl tzdata autoconf \
|
||||||
RUN (sed -i 's/Allow from .*/Satisfy Any/g' /etc/apache2/sites-available/000-default.conf)
|
&& apt-get clean \
|
||||||
RUN (sed -i 's/Order allow,deny.*/Allow from all/g' /etc/apache2/sites-available/000-default.conf)
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
RUN (mkdir -p /var/run/munin && chown -R munin:munin /var/run/munin)
|
|
||||||
|
|
||||||
RUN (chfn -f 'munin' root)
|
RUN cp /etc/munin/apache24.conf /etc/apache2/sites-available/000-default.conf \
|
||||||
RUN (/usr/sbin/a2enmod fcgid)
|
&& 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/Order allow,deny.*/Allow from all/g' /etc/apache2/sites-available/000-default.conf \
|
||||||
|
&& mkdir -p /var/run/munin \
|
||||||
|
&& chown -R munin:munin /var/run/munin \
|
||||||
|
&& chfn -f 'munin' root \
|
||||||
|
&& /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
|
||||||
|
@ -23,7 +28,7 @@ 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
|
||||||
ADD run.sh /usr/local/bin/run
|
COPY run.sh /usr/local/bin/run
|
||||||
RUN chmod +x /usr/local/bin/run
|
RUN chmod +x /usr/local/bin/run
|
||||||
|
|
||||||
# persist
|
# persist
|
||||||
|
|
Reference in a new issue