[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.master
parent
e081a847a1
commit
7fd982f948
|
@ -3,12 +3,13 @@ LABEL maintainer "https://m-ko.de Markus Kosmal <code@cnfg.io>"
|
||||||
|
|
||||||
# Debian Base to use
|
# Debian Base to use
|
||||||
ENV DEBIAN_VERSION stretch
|
ENV DEBIAN_VERSION stretch
|
||||||
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
# initial install of av daemon
|
# initial install of av daemon
|
||||||
RUN echo "deb http://http.debian.net/debian/ $DEBIAN_VERSION main contrib non-free" > /etc/apt/sources.list && \
|
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://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 && \
|
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-daemon \
|
||||||
clamav-freshclam \
|
clamav-freshclam \
|
||||||
libclamunrar7 \
|
libclamunrar7 \
|
||||||
|
|
|
@ -2,7 +2,7 @@ FROM debian:stretch-slim
|
||||||
#ubuntu:xenial
|
#ubuntu:xenial
|
||||||
LABEL maintainer "Andre Peters <andre.peters@servercow.de>"
|
LABEL maintainer "Andre Peters <andre.peters@servercow.de>"
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND noninteractive
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
ENV LC_ALL C
|
ENV LC_ALL C
|
||||||
ENV DOVECOT_VERSION 2.2.29.1
|
ENV DOVECOT_VERSION 2.2.29.1
|
||||||
ENV PIGEONHOLE_VERSION 0.4.18
|
ENV PIGEONHOLE_VERSION 0.4.18
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
FROM php:7.1-fpm
|
FROM php:7.1-fpm
|
||||||
LABEL maintainer "Andre Peters <andre.peters@servercow.de>"
|
LABEL maintainer "Andre Peters <andre.peters@servercow.de>"
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND noninteractive
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y \
|
RUN apt-get update && apt-get install -y \
|
||||||
g++ \
|
g++ \
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
FROM debian:stretch-slim
|
FROM debian:stretch-slim
|
||||||
LABEL maintainer "Andre Peters <andre.peters@servercow.de>"
|
LABEL maintainer "Andre Peters <andre.peters@servercow.de>"
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND noninteractive
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
ENV LC_ALL C
|
ENV LC_ALL C
|
||||||
|
|
||||||
RUN dpkg-divert --local --rename --add /sbin/initctl \
|
RUN dpkg-divert --local --rename --add /sbin/initctl \
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
FROM debian:jessie-slim
|
FROM debian:jessie-slim
|
||||||
LABEL maintainer "Andre Peters <andre.peters@servercow.de>"
|
LABEL maintainer "Andre Peters <andre.peters@servercow.de>"
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND noninteractive
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
ENV LC_ALL C
|
ENV LC_ALL C
|
||||||
|
|
||||||
RUN apt-key adv --fetch-keys http://rspamd.com/apt-stable/gpg.key \
|
RUN apt-key adv --fetch-keys http://rspamd.com/apt-stable/gpg.key \
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
FROM debian:jessie-slim
|
FROM debian:jessie-slim
|
||||||
LABEL maintainer "Andre Peters <andre.peters@servercow.de>"
|
LABEL maintainer "Andre Peters <andre.peters@servercow.de>"
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND noninteractive
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
ENV LC_ALL C
|
ENV LC_ALL C
|
||||||
|
|
||||||
RUN apt-key adv --fetch-keys http://rspamd.com/apt-stable/gpg.key \
|
RUN apt-key adv --fetch-keys http://rspamd.com/apt-stable/gpg.key \
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
FROM debian:jessie-slim
|
FROM debian:jessie-slim
|
||||||
LABEL maintainer "Andre Peters <andre.peters@servercow.de>"
|
LABEL maintainer "Andre Peters <andre.peters@servercow.de>"
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND noninteractive
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
ENV LC_ALL C
|
ENV LC_ALL C
|
||||||
ENV GOSU_VERSION 1.9
|
ENV GOSU_VERSION 1.9
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue