Dockerfile 执行 apt-get install 遇到会弹出窗口的程序……
docker 容器( ubuntu16.04 )里执行如下代码
apt-get update && apt-get install -y krb5-user
在安装krb5-*的时候,会弹出要求我填写Default Kerberos version 5 realm的提示:
..
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.22.1 /usr/local/share/perl/5.22.1 /usr/lib/x86_64-linux-gnu/perl5/5.22 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.22 /usr/share/perl/5.22 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base .) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
debconf: falling back to frontend: Teletype
Configuring Kerberos Authentication
-----------------------------------
When users attempt to use Kerberos and specify a principal or user name without specifying what administrative Kerberos realm that principal belongs to, the system appends the
default realm. The default realm may also be used as the realm of a Kerberos service running on the local machine. Often, the default realm is the uppercase version of the
local DNS domain.
Default Kerberos version 5 realm:
然后这里就中断了…… Dockerfile 没法自动编译……
这种情况怎么办? apt-get 加了-y,也不行……
回复:你需要先去了解下 debconf 静默安装
解决方案:
关闭交互式的静默安装DEB包
你会发现没有弹窗提示了!
root@ubuntu:~# DEBIAN_FRONTEND=noninteractive apt-get -y install ./mysql-apt-config_0.8.13-1_all.deb
增加:DEBIAN_FRONTEND=noninteractive .
相关文章:
https://www.cnblogs.com/RidingWind/p/14574060.html
为者常成,行者常至
自由转载-非商用-非衍生-保持署名(创意共享3.0许可证)