在docker中添加postgis时出现的此错误是什么

时间:2019-05-31 07:02:40

标签: django docker dockerfile postgis

我的Dockerfile的一部分如下:

RUN apt-get install -yqq software-properties-common
RUN add-apt-repository ppa:ubuntugis/ppa && apt-get update -yqq
RUN apt-get install -yqq gdal-bin
RUN apt-get install -yqq postgis

我先安装了postgis仓库,然后又安装了postgis,但是到了postgis的安装步骤时,我在屏幕上看到了这个提示,并且卡在了那里。

debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
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:

有人有什么想法吗?

1 个答案:

答案 0 :(得分:2)

在安装postgis时使用RUN DEBIAN_FRONTEND=noninteractive apt-get install -yqq postgis来抑制对话框,或者使用ARG DEBIAN_FRONTEND=noninteractive也不持久存在于容器中,但仍具有相同的效果。

也许也指https://github.com/docker/docker/issues/4032