使用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它。 如果有人已经使用这个工具,可以帮助我。
- 如何在不改变访问者的/ etc / hosts的情况下通过traefik简单地远程访问我的容器
- 使用docker在PHP 7.2上启用Opcache
- 如何使用ymlconfiguration文件在Apache Web服务器上启用压缩
- docker工人支持所有types的容器内的数据
- 如何使用Kubernetes在火花集群中安排作业
- 访问该容器内的docker容器自己的localhost – php apache
- 集群模式下的Apache Storm FileNotFoundException
- angularjs url重写不工作在运行apache2的docker容器
- 服务“networking”未能build立:lstat apache / sites-enabled / 000-default.conf:没有这样的文件或目录