Sunday 13 February 2022

Linux Ubuntu Docker install tzdata non interactive

 Problem

     Default Ubunt image from Docker does not come with Timezone data.  Installation of the package prompts for input, and this can be problematic for automated installation. This also cause issue when installing Python 3.9 on Docker image.

Solution

Create Timezone file and /etc/localtime link prior to installation 

 





apt update

echo "Europe/London" > /etc/timezone

ln -fs /usr/share/zoneinfo/Europe/London /etc/localtime

apt install -y tzdata