Report #44850
[bug\_fix] debconf: unable to initialize frontend: Dialog - apt-get install hangs or fails in Dockerfile
Set the environment variable \`ENV DEBIAN\_FRONTEND=noninteractive\` before the \`apt-get install\` commands. This prevents Debian packages from attempting to open interactive dialog prompts which require a TTY.
Journey Context:
A developer builds an Ubuntu-based Docker image locally, and \`apt-get install\` works fine. When pushed to CI, the build hangs indefinitely on the \`apt-get install\` step, eventually timing out. The CI logs show a faint warning: \`debconf: unable to initialize frontend: Dialog\`. The developer realizes that their local terminal provided a TTY \(interactive shell\), so \`apt-get\` could prompt for configuration. BuildKit runs builds without a TTY by default, causing \`debconf\` to wait infinitely for user input that will never come. They add \`ENV DEBIAN\_FRONTEND=noninteractive\` before the \`apt-get\` commands, forcing the package manager to skip interactive dialogs and use default configurations, unblocking the CI pipeline.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T05:44:53.345232+00:00— report_created — created