docker - 在 Docker 构建过程中如何避免问题?

标签 docker ubuntu dockerfile

我正在构建一个基于 Ubuntu 18.04 的 Docker 镜像。
它正在构建,但在完成之前我在 Powershell 控制台中收到:

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:
----

据我了解,它等待我的一些回答,但我无法输入任何数字,即键盘上没有反应。如何避免这个问题?可能在我可以在 dockerfile 中添加一个 CMD 吗?

最佳答案

我在 Dockerfile 中遇到了同样的问题,然后我用ARG DEBIAN_FRONTEND=noninteractive在基本图像之后,它对我有用:
示例 Dockerfile:

FROM ubuntu
ARG DEBIAN_FRONTEND=noninteractive

关于docker - 在 Docker 构建过程中如何避免问题?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61388002/

相关文章:

networking - docker 网络

node.js - 容器化时 NodeJS 应用程序停止工作 [容器中的 FTP 服务器]

Dockerfile - 参数化的 FROM

bash - 在 Dockerfile 中使用此处文档和 ENTRYPOINT/CMD

linux - 安装 PopcornTime 时找不到 .install 命令

docker - Docker无法公开mesos端口5050

docker - Dockerfile 中的条件复制?

python - Docker 和 pip 安装 : avoid installing all packages when some are already installed

android USB调试消失了,不再工作了

postgresql - Docker 容器中 PostgreSQL 的权限问题