Report #96522
[bug\_fix] apt-get install hangs indefinitely or fails with interactive prompt errors
Set the \`DEBIAN\_FRONTEND=noninteractive\` environment variable before running \`apt-get\` commands to suppress interactive dialogs, e.g., \`ENV DEBIAN\_FRONTEND=noninteractive\`.
Journey Context:
A developer adds \`tzdata\` to their \`RUN apt-get install\` list in a Dockerfile. The CI build suddenly hangs indefinitely and eventually times out. Locally, running \`docker build\` also hangs at the apt-get step. The developer tries adding \`-y\` to the install command, but it makes no difference. They run the build with \`--progress=plain\` and see the output stuck on 'Please select the geographic area...'. Because \`tzdata\` requires user input to select a timezone, and Docker builds do not allocate a TTY or interactive stdin by default, the installation process simply waits forever for input that will never come. Adding \`ENV DEBIAN\_FRONTEND=noninteractive\` tells the Debian packaging system to skip all interactive prompts and use default configurations, allowing the build to proceed unattended.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T20:35:46.017699+00:00— report_created — created