I use the latest version of chef-docker cookbook from the master branch. When I try to login to a private repository the following error is occurred:
================================================================================
Error executing action `login` on resource 'docker_registry[https://registry.xxx.com]'
================================================================================
Errno::ENOENT
-------------
No such file or directory - /root/.dockercfg
Cookbook Trace:
---------------
/tmp/vagrant-chef-1/chef-solo-2/cookbooks/docker/libraries/helpers.rb:59:in `read'
/tmp/vagrant-chef-1/chef-solo-2/cookbooks/docker/libraries/helpers.rb:59:in `dockercfg_parse'
/tmp/vagrant-chef-1/chef-solo-2/cookbooks/docker/providers/registry.rb:6:in `load_current_resource'
Resource Declaration:
---------------------
# In /tmp/vagrant-chef-1/chef-solo-1/cookbooks/test/recipes/default.rb
1: docker_registry 'https://registry.xxx.com' do
2: username 'xxx'
3: password 'yyy'
4: end
5:
Do I have to manually create the missing /root/.dockercfg file?
Btw, when I create it with the content:
it still doesn't solve the problem.
It seems that logged_in? always returns true even if we are not logged in. Because of this, the login function isn't called.
I use the latest version of chef-docker cookbook from the master branch. When I try to login to a private repository the following error is occurred:
Do I have to manually create the missing /root/.dockercfg file?
Btw, when I create it with the content:
it still doesn't solve the problem.
It seems that
logged_in?always returnstrueeven if we are not logged in. Because of this, theloginfunction isn't called.