To avoid interactive prompts during the Docker image build process, you can set the DEBIAN_FRONTEND environment variable argument to "noninteractive."
This prevents Debian-based package management tools, such as APT, from prompting for user input.
Suppose your Docker image needs the libglib2 package:
GLib is a library containing many useful C routines for things such as trees, hashes, lists, and strings. It is a useful general-purpose C library used by projects such as GTK+, GIMP, and GNOME.
Without the noninteractive mode set you will be prompted like this: