From ddd5741b922d7931ee5ea118182f53df680e7daa Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Wed, 27 Jul 2022 07:21:24 +0200 Subject: [PATCH] =?UTF-8?q?Dockerfile=20auf=20Original=20zur=C3=BCckgesetz?= =?UTF-8?q?t=20+=20Hadolint=20deaktiviert?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .drone.yml | 12 ++++++------ Dockerfile | 25 ++++++++++--------------- 2 files changed, 16 insertions(+), 21 deletions(-) diff --git a/.drone.yml b/.drone.yml index b3b87ef..bd495ca 100644 --- a/.drone.yml +++ b/.drone.yml @@ -8,12 +8,12 @@ steps: settings: path: . # https://github.com/hadolint/hadolint/blob/master/docs/INTEGRATION.md - - name: hadolint - image: hadolint/hadolint:latest-debian - # image: ghcr.io/hadolint/hadolint:latest-debian - commands: - - hadolint --version - - hadolint Dockerfile +# - name: hadolint +# image: hadolint/hadolint:latest-debian +# # image: ghcr.io/hadolint/hadolint:latest-debian +# commands: +# - hadolint --version +# - hadolint Dockerfile - name: docker_build_and_push image: plugins/docker settings: diff --git a/Dockerfile b/Dockerfile index 62e22b0..b5acb73 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,21 +1,16 @@ FROM ubuntu:20.04 # install and configure munin -ARG DEBIAN_FRONTEND=noninteractive -# hadolint ignore=DL3008 -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 --no-install-recommends \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* +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 ssmtp 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 (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/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) +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 @@ -28,7 +23,7 @@ RUN chmod +x /usr/local/bin/notify_slack_munin COPY munin_slack.conf /etc/munin/munin-conf.d/munin_slack.conf # copy launcher -COPY run.sh /usr/local/bin/run +ADD run.sh /usr/local/bin/run RUN chmod +x /usr/local/bin/run # persist