我正在通过mailutils映像上的dockerfile安装ubuntu。
我是通过这样做的:
RUN apt-get install -y mailutils
但是,在这一行中,我得到了以下内容:
Please select the mail server configuration type that best meets your needs.
No configuration:
Should be chosen to leave the current configuration unchanged.
Internet site:
Mail is sent and received directly using SMTP.
Internet with smarthost:
Mail is received directly using SMTP or by running a utility such
as fetchmail. Outgoing mail is sent using a smarthost.
Satellite system:
All mail is sent to another machine, called a 'smarthost', for delivery.
Local only:
The only delivered mail is the mail for local users. There is no network.
1. No configuration 3. Internet with smarthost 5. Local only
2. Internet Site 4. Satellite system当我对Debian映像做完全相同的事情时,我就没有这个选项。
我使用-y前缀来处理使用Dockerfile时的所有“是/否”安装问题。我该如何处理这样的选择呢?我尝试过添加一个-2前缀。
有办法跳过这个吗?为什么ubuntu需要这样做,而debian却不这样做?尽管不需要这样的输入,但我已经用debian检查并正确地使用了邮件功能。
发布于 2016-11-30 14:31:49
使用以下dockerfile
FROM ubuntu:latest
ENV DEBIAN_FRONTEND="noninteractive"
RUN apt-get update && apt-get install -y mailutils重要的部分是将debconf设置为noninteractive模式。
发布于 2016-11-30 17:10:35
您也可以使用this技巧,例如
FROM ubuntu:latest
RUN apt-get update && apt-get install -y
RUN echo "postfix postfix/mailname string your.hostname.com" | debconf-set-selections &&\
echo "postfix postfix/main_mailer_type string 'Internet Site'" | debconf-set-selections &&\
apt-get install -y mailutilshttps://stackoverflow.com/questions/40890011
复制相似问题