我试图用厨房码头开始测试。
kitchen-docker gem已通过bundler安装。
.kitchen.yml看起来像这样
---
driver:
name: docker
network:
- ["private_network", { ip: "192.168.33.10" }]
provisioner:
name: chef_solo
platforms:
- name: ubuntu-14.04
suites:
- name: default
run_list:
- recipe[homepage-test::default]
attributes:
" 捆绑执行厨房测试"命令最终会出现以下错误
-----> Starting Kitchen (v1.4.2)
-----> Creating <default-ubuntu-1204>...
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: Failed to complete #create action: [undefined method `create' for Tempfile:Class]
>>>>>> ----------------------
>>>>>> Please see .kitchen/logs/kitchen.log for more details
>>>>>> Also try running `kitchen diagnose --all` for configuration
我想这不会以某种方式起作用,因为它无法创建实例,但我不知道如何处理它。
###################更新#####################
github上发生了一个问题https://github.com/portertech/kitchen-docker/issues/148
这正是我以前的一些错误。 然后我用rbenv将ruby 2.0.0更新到2.2.3(最新的稳定版本)。
又出现了另一个错误,
我仍然坚持并仍然困惑为什么这不起作用,所以我检查了日志文件并显示错误信息
STDERR: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.20/build?cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=Dockerfile-kitchen-20151030-31260-10xmvl2&memory=0&memswap=0&rm=1&t=&ulimits=null: dial unix /var/run/docker.sock: connect: no such file or directory.
* Are you trying to connect to a TLS-enabled daemon without TLS?
* Is your docker daemon up and running?
答案 0 :(得分:0)
此消息:
STDERR: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.20/build?cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=Dockerfile-kitchen-20151030-31260-10xmvl2&memory=0&memswap=0&rm=1&t=&ulimits=null: dial unix /var/run/docker.sock: connect: no such file or directory.
* Are you trying to connect to a TLS-enabled daemon without TLS?
* Is your docker daemon up and running?
表示您的docker守护程序未运行。试试?
service docker start
检查之后是否存在/var/run/docker.sock
。