Browse code

Add "DEBIAN_FRONTEND" to FAQ

Added some explanation on using ‘DEBIAN_FRONTEND’ to the FAQs. As
discussed here;
https://github.com/docker/docker/pull/7035#issuecomment-50967867

Docker-DCO-1.1-Signed-off-by: Sebastiaan van Stijn <github@gone.nl> (github: thaJeztah)

Sebastiaan van Stijn authored on 2014/08/11 03:09:46
Showing 1 changed files
... ...
@@ -225,6 +225,38 @@ Downloading and installing an "all-in-one" .deb or .rpm sounds great at first,
225 225
 except if you have no way to figure out that it contains a copy of the
226 226
 OpenSSL library vulnerable to the [Heartbleed](http://heartbleed.com/) bug.
227 227
 
228
+### Why is `DEBIAN_FRONTEND=noninteractive` discouraged in Dockerfiles?
229
+
230
+When building Docker images on Debian and Ubuntu you may have seen errors like:
231
+
232
+    unable to initialize frontend: Dialog
233
+
234
+These errors don't stop the image from being built but inform you that the
235
+installation process tried to open a dialog box, but was unable to. 
236
+Generally, these errors are safe to ignore.
237
+
238
+Some people circumvent these errors by changing the `DEBIAN_FRONTEND` 
239
+environment variable inside the Dockerfile using:
240
+
241
+    ENV DEBIAN_FRONTEND=noninteractive
242
+
243
+This prevents the installer from opening dialog boxes during installation 
244
+which stops the errors.
245
+
246
+While this may sound like a good idea, it *may* have side effects. 
247
+The `DEBIAN_FRONTEND` environment variable will be inherited by all 
248
+images and containers built from your image, effectively changing
249
+their behavior. People using those images will run into problems when
250
+installing software interactively, because installers will not show
251
+any dialog boxes.
252
+
253
+Because of this, and because setting `DEBIAN_FRONTEND` to `noninteractive` is
254
+mainly a 'cosmetic' change, we *discourage* changing it.
255
+
256
+If you *really* need to change its setting, make sure to change it
257
+back to its [default value](https://www.debian.org/releases/stable/i386/ch05s03.html.en) 
258
+afterwards.
259
+
228 260
 ### Can I help by adding some questions and answers?
229 261
 
230 262
 Definitely! You can fork [the repo](https://github.com/docker/docker) and