149376 (3) [Avatar] Offline
#1
Hi,

This might be somewhat on the side of the topic, but I hope it's relevant enough for an answer smilie

Since the 16.04 ubuntu version does not seem to work anymore, I tried moving to 18.10 (and also 18.04). These do not
have apache installed, so I added apache2 to the package list. However, despite -y being specified, the apache2 install
tries to interactively ask me about location/timezones.

What is the proper way to install apache2 using apt, and avoid all interactivity?
MacFlecknoe (21) [Avatar] Offline
#2
You will need to pass DEBIAN_FRONTEND=noninteractive to apt-get:

RUN apt-get update \
    && apt-get upgrade -y \
    && DEBIAN_FRONTEND=noninteractive apt-get install -y \
    apache2 \
    libapache2-mod-php \
    php7.0 \
    php7.0-mysql \
    && rm -rf /var/lib/apt/lists/*