构建dockerfile时忽略redmine提示符

时间:2016-05-06 09:56:34

标签: docker redmine dockerfile

我正在构建泊坞文件:

FROM ubuntu:wily

RUN apt-get update
RUN apt-get install -y ruby 1.9.3
RUN apt-get install -y apache2 libapache2-mod-passenger
RUN apt-get install -y mysql-client
RUN apt-get install -y redmine redmine-mysql

最后一个命令将安装Redmine,它会提示要求配置数据库连接,如下所示: 包配置

 ┌──────────────────────────┤ Configuring redmine ├──────────────────────────┐  
 │                                                                           │  
 │ The redmine/instances/default package must have a database installed and  │  
 │ configured before it can be used.  This can be optionally handled with    │  
 │ dbconfig-common.                                                          │  
 │                                                                           │  
 │ If you are an advanced database administrator and know that you want to   │  
 │ perform this configuration manually, or if your database has already      │  
 │ been installed and configured, you should refuse this option.  Details    │  
 │ on what needs to be done should most likely be provided in                │  
 │ /usr/share/doc/redmine/instances/default.                                 │  
 │                                                                           │  
 │ Otherwise, you should probably choose this option.                        │  
 │                                                                           │  
 │ Configure database for redmine/instances/default with dbconfig-common?    │  
 │                                                                           │  
 │                    <Yes>                       <No>                       │  
 │                                                                           │  
 └───────────────────────────────────────────────────────────────────────────┘  
问:在构建Dockerfile时,我不知道如何对此说不。我只想忽略这一点,继续运行其他命令并延迟配置数据库连接。

1 个答案:

答案 0 :(得分:0)

运行apt-get install -y redmine redmine-mysql =&gt; RUN DEBIAN_FRONTEND =非交互式apt-get install -y redmine redmine-mysql