2016-11-30 12 views
1

イメージubuntudockerfileを介してmailutilsをインストールしています。Ubuntu dockerfile - mailutils install

私は経由して次の操作を行います。しかし、このライン上で、私は次の取得

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を使用するときにすべてのyes/noインストールの質問を処理します。このようなオプションをどうすれば処理できますか?私は-2接頭辞を追加しようとしました。

これをスキップする方法はありますか?なぜはdebianがそうでないときにこれを必要としますか?私はチェックして、この入力を必要としないにもかかわらずメールがdebianで正しく機能するようにしました。 dockerfile

答えて

2

用途:

FROM ubuntu:latest 
ENV DEBIAN_FRONTEND="noninteractive" 
RUN apt-get update && apt-get install -y mailutils 

重要な部分はnoninteractiveモードにdebconfを設定しています。

0

また

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 mailutils 
のようなもので thisトリックを使用することができます
関連する問題