New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ENV DEBIAN_FRONTEND noninteractive #4032
Comments
|
This is definitely not a reasonable default, and setting it via APT is smart enough to detect that it's not being run interactively, but it throws out some pretty ugly looking warnings (that thanks to our new build stuff are red now), and setting this hides them. The reason it's not a good default is that if I |
|
/me ponders where to document that... Does this mean Dockerfile authors should avoid using (and awful lot of the postgreSQL example complains without) alternativly, could I |
|
closed by #4035 |
|
I saw the note in the docs that
and am now thinking "Ok, so what should I do instead?" The subsquent google search landed me here. Neither this issue nor the docs give a clear recommendation... So what is the canonical way to run Seems to be the way to do it. @SvenDowideit hints at:
But is it possible to "then ENV unset it after"? A single-arg: Doesn't work, and I can't find a undef/NULL/nil value for ENV in the docs. I'd love to hear/read the canonical way to do it somewhere... |
|
@pmorch You could just set it to it's default value |
|
Maybe there should be a BUILDENV command that just sets environment during build :) |
|
hmmm #9176 :-) |
`DEBIAN_FRONTEND` environment variable remains all time. We need it to be `noninteractive` only when we do `apt-get install`. See moby/moby#4032.
|
What is the consensus on the best practice here? |
|
@drastik best practice is to not use In most cases, omitting "DEBIAN_FRONTEND" is harmless and only produces some warnings during build (which can be ignored). If really needed, |
Do not set it in the resulting image, which is discouraged because the container may be run interactively at some point. With this particular container, an interactive run is quite likely. See moby/moby#4032 (comment)
|
The new ARG directive in the Dockerfile can set this only during the build
|
More info can be found in [docker issue #4032](moby/moby#4032 (comment)) Remove errors such as: > debconf: unable to initialize frontend: Dialog > debconf: (TERM is not set, so the dialog frontend is not usable.) > debconf: falling back to frontend: Readline > debconf: unable to initialize frontend: Readline > debconf: (This frontend requires a controlling tty.) > debconf: falling back to frontend: Teletype
More info can be found in [docker issue #4032](moby/moby#4032 (comment)) Remove errors such as: > debconf: unable to initialize frontend: Dialog > debconf: (TERM is not set, so the dialog frontend is not usable.) > debconf: falling back to frontend: Readline > debconf: unable to initialize frontend: Readline > debconf: (This frontend requires a controlling tty.) > debconf: falling back to frontend: Teletype
…ng it via ENV should be actively discouraged, because if I docker run -i -t ... bash, I'm now interactive, and this variable being set is very, very wrong, according to this issue: moby/moby#4032.
…ng it via ENV should be actively discouraged, because if I docker run -i -t ... bash, I'm now interactive, and this variable being set is very, very wrong, according to this issue: moby/moby#4032. (#64)
Get rid of warnings during package configuration by specifying non- interactive as DEBIAN_FRONTEND environment variable. Use ARG to make sure that this environment variable is only set during build time. Use ONBUILD ARG to make sure that non-interactive frontend is also used in downstream builds. Docker builds are non-interactive by nature so this should be a sensible default for downstream builds. See also: moby/moby#4032 (comment) Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
- Move DEBIAN_FRONTEND=noninteractive to inline (Ref: moby/moby#4032) - Add fallback URL from GitHub for Libreswan source
ENV variables remain after the build. moby/moby#4032 (comment) Signed-off-by: Daniel Sangorrin <daniel.sangorrin@toshiba.co.jp>
ENV variables remain after the build. moby/moby#4032 (comment) Signed-off-by: Daniel Sangorrin <daniel.sangorrin@toshiba.co.jp>
ENV variables remain after the build. moby/moby#4032 (comment) Signed-off-by: Daniel Sangorrin <daniel.sangorrin@toshiba.co.jp>
Using ENV is discouraged as the environment variable persists after the build, confusing apt. See: moby/moby#4032 (comment)
when required instead of ENV Setting `ENV DEBIAN_FRONTEND=noninteractive` is highly discouraged as per https://docs.docker.com/engine/faq/#why-is-debian_frontendnoninteractive-discouraged-in-dockerfiles and moby/moby#4032 (comment) Signed-off-by: nanake <nanake@users.noreply.github.com>
Using DEBIAN_FRONTEND as Docker ENV variable is discouraged: moby/moby#4032 (comment)
should we really expect users of our deb base images to add
ENV DEBIAN_FRONTEND noninteractiveto the start of all their Dockerfiles, or is this actually a reasonable default that we could set for them?The text was updated successfully, but these errors were encountered: