Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
echo "Executing post-install script"
# Third party software dependencies
dnf update -y
dnf install git -y
dnf install docker -y
# Start Docker
@jaamarks
jaamarks / debian_frontend_noninteractive.md
Last active March 13, 2024 00:29
Dockerfile: ARG DEBIAN_FRONTEND noninteractive

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.

Example: Interactive Prompt during APT Package Installation

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: