We want to create a chef recipe which can able to login to docker registry and pull some images. I have tried using docker_registry resource as mentioned here https://github.com/chef-cookbooks/docker#docker_registry.
my resource in recipe looks like
docker_registry 'my local registry' do serveraddress 'https://xxxxxxxx.com/' username 'xxxx' password 'xxxxx' end
But this is failing as undefined method docker_registry.
ERROR: Exception handlers complete Chef Client failed. 0 resources updated in 02 seconds FATAL: Stacktrace dumped to /tmp/kitchen/cache/chef-stacktrace.out FATAL: Please provide the contents of the stacktrace.out file if you file a bug report ERROR: undefined method `docker_registry' for cookbook:xxxxxxxx, recipe: xxxxx :Chef::Recipe FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
Do we need to define any dependency in metadata.rb so that resource can be executed? what is the best way to login to docker registry using chef. Thanks Much for the help!