Is it possible to answer dialog questions when installing under docker?

See the discussion here: https://github.com/docker/docker/issues/4032. In short, setting ENV DEBIAN_FRONTEND noninteractive is not recommended as it persists in the final image, even when running something like docker run -i -t ... bash. Therefore it is recommended either to omit DEBIAN_FRONTEND and live with the warning, or specify it explicitly for each command e.g. RUN DEBIAN_FRONTEND=noninteractive apt-get install -y -q package.

Fortunately, the new ARG directive sets variables that only live during the build so a more elegant solution is now possible that’s specified in the DockerFile yet does not persist in the final image: ARG DEBIAN_FRONTEND=noninteractive.

Leave a Comment