-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
Description
related:
- point out that ENV DEBIAN_FRONTEND will persist, so its not recommended moby#4035
- ENV DEBIAN_FRONTEND noninteractive moby#4032
- Add "DEBIAN_FRONTEND" to FAQ moby#7516
When building images on debian-based distributions, there used to be issues with installing some packages when running non-interactively; some packages could ask for user-input, and "hang" when run as part of a Dockerfile. At some point we therefore added recommendations in our docs / FAQ to set DEBIAN_FRONTEND=noninteractive for those commands. Some users did so using ENV, which was problematic; we added a warning for this situation in our docs in moby/moby@2bbf875
Note that setting "
ENV DEBIAN_FRONTEND=noninteractive" may cause
unintended consequences, because it will persist when the container is run
interactively, as with the following command:docker run -t -i image bash
But once ARG was introduced, which does not persist in the image, users started to use ARG DEBIAN_FRONTEND=noninteractive.
Note that using DEBIAN_FRONTEND=noninteractive is no longer needed for current Debian (and Ubuntu) versions, so using this workaround is now obsolete.
Perhaps we should introduce a linter / check for these, and produce a warning;
- if
ENV DEBIAN_FRONTEND=noninteractiveis used (for reasons outlined above) - possibly also for
ARG DEBIAN_FRONTEND(either with, or without value), as this workaround is obsolete (unless using an old version of Debian or Ubuntu).