-
Notifications
You must be signed in to change notification settings - Fork 232
Description
Version:
[2.10.0]
Environment: [all cookbooks and ubuntu and centos containers]
Scenario:
[docker in docker test kitchen fails, see below]
Steps to Reproduce:
all of a sudden, possibly starting this week or last week, docker-based test kitchen pipelines have stopped working. Getting the error: "docker inspect" requires at least 1 argument.
See 'docker inspect --help'.
Usage: docker inspect [OPTIONS] NAME|ID [NAME|ID...]
Return low-level information on Docker objects
i've recreated this manually in docker on my workstation by running the chef/chefworkstation container and manually running the steps in my pipeline. I've also repeated the same using a generic centos 7 container and installing chef workstation myself. there seems to be some disconnect between kitchen-docker gem and docker-ce-cli.
Here is what i'm doing once i launch the container (the keys redacted):
#!/bin/bash
yum -y install wget
wget https://packages.chef.io/files/stable/chef-workstation/0.17.5/el/7/chef-workstation-0.17.5-1.el7.x86_64.rpm
rpm -Uvh chef-workstation-0.17.5-1.el7.x86_64.rpm
echo 'eval "$(chef shell-init bash)"' >> ~/.bash_profile
source ~/.bash_profile
gem install kitchen-docker
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum -y install docker-ce-cli
mkdir -p /builds/tech/chef-cookbooks
if [[ ! -d ~/.chef ]];then mkdir ~/.chef;fi
echo "insert key here"|base64 -d > ~/.chef/pimco-validator.pem
echo "insert key here"|base64 -d > /tmp/s_gitchf_p.pem
echo "node_name 's_gitchf_p'" >> ~/.chef/knife.rb
echo "client_key '/tmp/s_gitchf_p.pem'" >> /.chef/knife.rb/.chef/pimco-validator.pem'" >> ~/.chef/knife.rb
echo "validation_key '
echo "chef_server_url 'https://chef.core.pimcocloud.net/organizations/pimco'" >> ~/.chef/knife.rb
echo "cookbook_path [ '/builds/tech/chef-cookbooks/' ]" >> ~/.chef/knife.rb
knife ssl fetch
after that i do a docker cp to the container of my git checkout and run kitchen create.
it appears that it's never creating the child container.
Expected Result:
[kitchen creates containers]
Actual Result:
[no container is created, and docker inspect fails because it wants an id, and no id is provided]
NOTE: forcing gem install -v 2.9.0 fixes the issue, so it's a particular issue with 2.10.0. may be docker-in-docker specific issue.