我正在构建一个基于 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/