1

I'm building a Docker image based on Ubuntu 18.04 and installing some packages that pull in tzdata package as a dependency.

Unfortunately during the installation it runs dpkg-reconfigure tzdata which in turn starts a dialog that asks for your continent and city. That obviously doesn't work in docker build ..., that build must be non-interactive and automated.

I can't figure out how to prevent it from asking for the timezone and for example pre-set GMT.

This is the output:

Setting up libnuma1:amd64 (2.0.11-2.1) ...
Setting up tzdata (2018g-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: _

And there is waits forever.

I'm not even sure which package pulls it in.

Can I somehow force the apt-get install -y to be non-interactive (apparently the -y doesn't do it) or somehow pre-set the timezone e.g. to UTC?

Thanks!

Bububu
  • 111

0 Answers0