如何为“ RUN”命令的交互式命令填写用户输入?

问题描述 投票:0回答:1

我只是在Docker映像上尝试ubuntu:19.04,我希望在映像中安装tcl,所以我有:

RUN apt update && apt install tcl

然后它将提供一些交互式命令:

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   3. Antarctica  5. Arctic  7. Atlantic  9. Indian    11. SystemV  13. Etc
2. America  4. Australia   6. Asia    8. Europe    10. Pacific  12. US

我在这里有2个问题:

((1)如果我在Docker文件中为“ RUN”编写此命令,则在此处输入数字后即为“ docker build”。似乎很困扰。

((2)我希望不必手动输入选择,我有什么办法可以在“运行”中提供选择,以便其自动执行吗?

docker command dockerfile interactive
1个回答
1
投票

您尝试禁用它吗?

© www.soinside.com 2019 - 2024. All rights reserved.