Skip to content

Error executing action login on resource docker_registry #114

Description

@psviderski

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions