LoginSignup
13
6

More than 1 year has passed since last update.

Ubuntu 20.04のdocker build時にタイムゾーン選択を求められた時の対処メモ

Posted at

別記事でUbuntu 20.04をベースイメージとして、docker buildを行った時に、以下のようなメッセージが出て、数値を入力しても先に進まなくなりハマった際の対処メモです。

・・・(省略)・・・
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        6. Asia            11. System V timezones
  2. America       7. Atlantic Ocean  12. US
  3. Antarctica    8. Europe          13. None of the above
  4. Australia     9. Indian Ocean
  5. Arctic Ocean  10. Pacific Ocean
Geographic area:

対処としては、以下のようにRUN ln -sf /usr/share/zoneinfo/Asia/Tokyo /etc/localtimeという行を追加しました。

Dockerfile
FROM ubuntu:20.04

# ★★★ ↓の行を追加 ★★★
RUN ln -sf /usr/share/zoneinfo/Asia/Tokyo /etc/localtime

RUN apt-get update \
 && apt-get install -y git tzdata

RUN date

参考

13
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
13
6