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 2. America 3. Antarctica 4. Australia 5. Arctic 6. Asia 7. Atlantic 8. Europe 9. Indian 10. Pacific 11. SystemV 12. US 13. Etc Geographic area:
在自动化构建时会由于交互问题一直卡住,为了解决这个问题,我们需要将 tzdata 设置为非交互。
解决方法
在 dockerfile 中添加 DEBIAN_FRONTEND=noninteractive 环境变量或者直接在 RUN 中添加
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Reading package lists... Building dependency tree... Reading state information... The following NEW packages will be installed: tzdata 0 upgraded, 1 newly installed, 0 to remove and 7 not upgraded. Need to get 295 kB of archives. After this operation, 4033 kB of additional disk space will be used. Get:1 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 tzdata all 2021a-0ubuntu0.20.04 [295 kB] debconf: delaying package configuration, since apt-utils is not installed Fetched 295 kB in 1s (198 kB/s) Selecting previously unselected package tzdata. (Reading database ... 4121 files and directories currently installed.) Preparing to unpack .../tzdata_2021a-0ubuntu0.20.04_all.deb ... Unpacking tzdata (2021a-0ubuntu0.20.04) ... Setting up tzdata (2021a-0ubuntu0.20.04) ... debconf: unable to initialize frontend: Dialog debconf: (TERM is not set, so the dialog frontend is not usable.) debconf: falling back to frontend: Readline debconf: unable to initialize frontend: Readline debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.30.0 /usr/local/share/perl/5.30.0 /usr/lib/x86_64-linux-gnu/perl5/5.30 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.30 /usr/share/perl/5.30 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.) debconf: falling back to frontend: Teletype 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: Use of uninitialized value $_[1] in join or string at /usr/share/perl5/Debconf/DbDriver/Stack.pm line 111.
Current default time zone: '/UTC' Local time is now: Wed Apr 14 02:38:09 UTC 2021. Universal Time is now: Wed Apr 14 02:38:09 UTC 2021. Run 'dpkg-reconfigure tzdata' if you wish to change it.
Use of uninitialized value $val in substitution (s///) at /usr/share/perl5/Debconf/Format/822.pm line 83, <GEN6> line 4. Use of uninitialized value $val in concatenation (.) or string at /usr/share/perl5/Debconf/Format/822.pm line 84, <GEN6> line 4. Removing intermediate container c89b1bf7bdcb ---> 96ee179e6473 Successfully built 96ee179e6473 Successfully tagged tzdata:test