使用DockerconfigurationTiller

我正在尝试使用DockerconfigurationTiller,因为我想在Docker运行时使用此工具传递参数。 我按照教程和文档 ,我有接下来的文件说教程:

1- Dockerfile

FROM httpd RUN apt-get update && apt-get install -y ruby && gem install tiller ADD data/tiller /etc/tiller CMD ["/usr/local/bin/tiller" , "-v"] 

httpd是一个包含一个Apache HTTP服务器的图像,我用下面的命令获取它:

 docker pull httpd 

其他步骤包含Ruby an Tiller安装,以及需要传递参数(模板和公共文件)的文件的副本。

2- common.yaml

 exec: [ "/usr/local/apache2/bin/httpd"] data_sources: [ "defaults", "file", "environment" ] template_sources: [ "file" ] environments: production: index.erb: target: /usr/local/apache2/htdocs/index.html 

在这个文件中,我configuration了一个叫做生产环境,我想从它的模板创build一个html文件。

3- index.erb

 <h1>Start Service</h1> Server, <%= env_number %>. 

这个文件是我定义一个variables的模板。

所以对于这个文件,我继续构build如下图像:

 docker build -t apache_tiller . 

最后,我运行该图像:

 docker run -e environment=production -e number=1 -t -i -p 8080:80 apache_tiller 

问题:

当我运行图像时,我得到这个以错误结束的跟踪:

 tiller v1.1.0 (https://github.com/markround/tiller) <github@markround.com> Using common.yaml v2 format configuration file Using configuration from /etc/tiller Using plugins from /usr/local/lib/tiller Using environment production Template sources loaded [FileTemplateSource] Data sources loaded [DefaultsDataSource, FileDataSource, EnvironmentDataSource] Available templates : ["index.erb"] Building template index.erb Setting ownership/permissions on /usr/local/apache2/htdocs/index.html Template generation completed Executing ["/usr/local/apache2/bin/httpd"]... Child process forked with PID 7 Caught signal WINCH, passing to PID 7 AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 172.17.0.2. Set the 'ServerName' directive globally to suppress this message Main child process with PID 7 exited with status 0 Child process exited with status 0 Child process finished, Tiller is stopping. 

我不明白为什么会抛出这个错误。 我也执行了教程示例,它不显示HTML,我真的不知道如何configuration它。 如果有人已经使用这个工具,可以帮助我。