1

While trying to install tzdata into an ubuntu docker image the job would get stuck at this stage.

Unpacking tzdata (2022a-0ubuntu0.18.04) ...
Setting up tzdata (2022a-0ubuntu0.18.04) ...
debconf: unable to initialize frontend: Dialog
debconf: (Dialog frontend will not work on a dumb terminal, an emacs shell buffer, or without a controlling terminal.)
debconf: falling back to frontend: Readline
Configuring tzdata
------------------
Please select the geographic area in which you live. Subsequent configuration
questions will narrow this down by presenting a list of cities, representing
the time zones in which they are located.
  1. Africa      4. Australia  7. Atlantic  10. Pacific  13. Etc
  2. America     5. Arctic     8. Europe    11. SystemV
  3. Antarctica  6. Asia       9. Indian    12. US
Geographic area: 
Drew
  • 46
  • 1
  • 4

1 Answers1

0

After a lot of trial and error and research i finally managed to fix it by adding the following to the scripts tag in the .gitlab-ci.yml

- echo 'debconf debconf/frontend select Noninteractive' | sudo debconf-set-selections
- DEBIAN_FRONTEND=noninteractive sudo apt-get update && sudo apt-get -y --no-install-recommends install tzdata
- sudo cp /usr/share/zoneinfo/Australia/Brisbane /etc/localtime
Drew
  • 46
  • 1
  • 4