[Dockerfiles] Do not persist DEBIAN_FRONTEND=noninteractive in images

According to https://github.com/moby/moby/issues/4032#issuecomment-163689851
(and some other comments in the issue) it's not recommended to set
`DEBIAN_FRONTEND` via `ENV` in a Dockerfile.  `ARG` has the same
effect at build time but does not change `DEBIAN_FRONTEND` in the
final image, so I switched to it.  It should also work to remove it
completely.
This commit is contained in:
Michael Käufl
2017-05-13 16:29:18 +02:00
parent e081a847a1
commit 7fd982f948
7 changed files with 8 additions and 7 deletions

View File

@@ -3,12 +3,13 @@ LABEL maintainer "https://m-ko.de Markus Kosmal <code@cnfg.io>"
# Debian Base to use
ENV DEBIAN_VERSION stretch
ARG DEBIAN_FRONTEND=noninteractive
# initial install of av daemon
RUN echo "deb http://http.debian.net/debian/ $DEBIAN_VERSION main contrib non-free" > /etc/apt/sources.list && \
echo "deb http://http.debian.net/debian/ $DEBIAN_VERSION-updates main contrib non-free" >> /etc/apt/sources.list && \
echo "deb http://security.debian.org/ $DEBIAN_VERSION/updates main contrib non-free" >> /etc/apt/sources.list && \
apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --no-install-recommends \
apt-get update && apt-get install -y -qq --no-install-recommends \
clamav-daemon \
clamav-freshclam \
libclamunrar7 \