Avoiding user interaction with tzdata when installing certbot in a docker container
To run dpkg
(behind other tools like Apt) without interactive dialogue, you can set one environment variable as
DEBIAN_FRONTEND=noninteractive
For example, you can set it in Dockerfile using ARG:
ARG DEBIAN_FRONTEND=noninteractive
On Ubuntu 18.04 I did that Dockerfile:
ENV TZ=Europe/Minsk
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apt update && apt instal....
TL&DR: Within your DockerFile
ENV DEBIAN_FRONTEND=noninteractive
Reason:
Certain Installers make 'installations' easier by having a nice front-end. While this is great when you have a manual install, this becomes an issue during automated installations.
You can over ride the interactive installation by placing the following in your environment string.
Cheers