使用apt-get安装某些软件包时,是否可以以某种方式回答出现在对话框中的问题?
例如,我正在尝试设置包含以下内容的mail-stack-delivery
软件包的容器:
FROM ubuntu
RUN apt-get install -y mail-stack-delivery
但是,在构建时,dockerfile会产生许多错误,这些错误包括:
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (Can't locate Term/ReadLine.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7, <> line 11.)
debconf: falling back to frontend: Teletype
dpkg-preconfigure: unable to re-open stdin:
据我了解,我只是无法响应对话框,但是是否可以通过某种方式提前传递参数来回答每个问题?我知道它只是在更改一些配置,因此事后我可以这样做,但是大概最好让安装脚本来做,这样可以正确设置所有内容。
RUN apt-get -y -qq install python-pip php-mbstring php-bcmath
消息正在A new version (/usr/lib/php/7.0/php.ini-production.cli) of configuration file /etc/php/7.0/cli/php.ini is available, but the version installed currently has been locally modified
显示的提示下正在停止构建dockerfile ....What do you want to do about modified configuration file php.ini
...1. install the new version, 2. keep the local version
....添加此env var会忽略提示