[elbe-devel] [PATCH] dockerfile: fix setting noninteractive env var

Manuel Traut manut at linutronix.de
Thu Dec 6 10:20:02 CET 2018


The DEBIAN_FRONTEND env var is not recognized currently, because
if specified in RUN the value needs to be set with '=':

	RUN export DEBIAN_FRONTEND=noninteractive; ..

But instead of specifying it on multiple RUN commands it can be
set globally with ENV. Than no '=' is needed.

Signed-off-by: Manuel Traut <manut at linutronix.de>
---
 contrib/dockerfile/Dockerfile.in | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/contrib/dockerfile/Dockerfile.in b/contrib/dockerfile/Dockerfile.in
index 12f6ab5a..8be57209 100644
--- a/contrib/dockerfile/Dockerfile.in
+++ b/contrib/dockerfile/Dockerfile.in
@@ -9,6 +9,7 @@
 FROM elbeproject/debian-stretch:latest
 
 USER root
+ENV DEBIAN_FRONTEND noninteractive
 
 # use a sources.list including security and backports
 RUN echo "deb http://ftp.de.debian.org/debian stretch main" > /etc/apt/sources.list; \
@@ -16,8 +17,7 @@ RUN echo "deb http://ftp.de.debian.org/debian stretch main" > /etc/apt/sources.l
     echo "deb http://security.debian.org/debian-security stretch/updates main" >> /etc/apt/sources.list
 
 # update, upgrade and install elbe runtime-dependencies
-RUN export DEBIAN_FRONTEND noninteractive ;\
-    apt-get update -y ;\
+RUN apt-get update -y ;\
     apt-get install -y --no-install-recommends \
         systemd \
         ca-certificates \
@@ -51,14 +51,11 @@ ENV LC_ALL en_US.UTF-8
 RUN apt-add-repository 'deb http://debian.linutronix.de/elbe-testing stretch main'
 RUN wget http://debian.linutronix.de/elbe-testing/elbe-repo.pub
 RUN apt-key add elbe-repo.pub
-RUN export DEBIAN_FRONTEND noninteractive ;\
-    apt-get update -y
-RUN export DEBIAN_FRONTEND noninteractive ;\
-    apt-get install -y --no-install-recommends \
+RUN apt-get update -y
+RUN apt-get install -y --no-install-recommends \
         elbe \
         elbe-doc
-RUN export DEBIAN_FRONTEND noninteractive ;\
-    apt-get clean -y
+RUN apt-get clean -y
 RUN rm -rf /var/lib/apt/lists/*
 
 # create elbe user
-- 
2.19.2




More information about the elbe-devel mailing list