ubuntu20.04LTSにjreをインストールしようとしたらGeographic areaの入力を求められる

2020.11.18 204 views

jre の入った docker 環境を作ろうと思い、Dockerfileに次のような行を記述していました。

RUN apt-get install -y openjdk-8-jre

この状態で、docker-compose buildを行うと、次のようなメッセージが表示されて対話型コンソールになり 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      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:

回避する方法はないかと調べた結果、Dockerfileに次の一行を追加することで回避することが出来ました。

ENV DEBIAN_FRONTEND=noninteractive

関連記事