From 5a9ef0e48db5c792e09b307db7942d038a7f4e6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Fri, 28 Jan 2022 09:14:23 +0100 Subject: [PATCH] Remove policykit-1 package after installing BIND 9 --- Dockerfile | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index dacf6fb..494a456 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,12 +4,23 @@ MAINTAINER BIND 9 Developers ENV DEBIAN_FRONTEND noninteractive ENV LC_ALL C.UTF-8 -RUN apt-get -qqqy update -RUN apt-get -qqqy install apt-utils software-properties-common dctrl-tools - ARG DEB_VERSION=1:9.18.0-2+ubuntu20.04.1+isc+1 + +# Install add-apt-repository command +RUN apt-get -qqqy update +RUN apt-get -qqqy dist-upgrade +RUN apt-get -qqqy install --no-install-recommends apt-utils software-properties-common dctrl-tools + +# Add the BIND 9 APT Repository RUN add-apt-repository -y ppa:isc/bind-dev -RUN apt-get -qqqy update && apt-get -qqqy dist-upgrade && apt-get -qqqy install bind9=$DEB_VERSION bind9-utils=$DEB_VERSION + +# Install BIND 9 +RUN apt-get -qqqy update +RUN apt-get -qqqy dist-upgrade +RUN apt-get -qqqy install bind9=$DEB_VERSION bind9utils=$DEB_VERSION + +# Now remove the pkexec that got pulled as dependency to software-properties-common +RUN apt-get --purge -y remove policykit-1 RUN mkdir -p /etc/bind && chown root:bind /etc/bind/ && chmod 755 /etc/bind RUN mkdir -p /var/cache/bind && chown bind:bind /var/cache/bind && chmod 755 /var/cache/bind