puppetlabs-docker icon indicating copy to clipboard operation
puppetlabs-docker copied to clipboard

Fix for permission denied with registry

Open agxs opened this issue 2 years ago • 5 comments

When using local_user when creating registry credentials, puppet would fail with a permission denied error when writing to .docker/config.json. When local_user was specified, it seems that the docker login command would use the incorrect home directory of the specified user.

Making sure the HOME environment variable was set fixes the problem.

Seems to be related to https://github.com/puppetlabs/puppetlabs-docker/issues/358

I experienced this problem on Centos7.

Not sure this is necessarily the best way to fix this, but it solved my problem.

agxs avatar Jan 16 '23 13:01 agxs

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Jan 16 '23 13:01 CLAassistant

docker::registry is a type

Breaking changes to this file WILL impact these 2 modules (exact match):

This module is declared in 6 of 580 indexed public Puppetfiles.


These results were generated with Rangefinder, a tool that helps predict the downstream impact of breaking changes to elements used in Puppet modules. You can run this on the command line to get a full report.

Exact matches are those that we can positively identify via namespace and the declaring modules' metadata. Non-namespaced items, such as Puppet 3.x functions, will always be reported as near matches only.

Hey! It looks like CI need some adjustment to match the fixed behavior: see spec/shared_examples/registry.rb where exec_env needs to be updated.

smortex avatar Jan 16 '23 17:01 smortex

Thanks, I'll add that fix to the PR.

agxs avatar Jan 17 '23 09:01 agxs

Sorry for the delay in this. I've been having a lot of trouble getting the PDK to do a bundle install. Every machine I've tried this on (Linux & MacOS) just hangs on the 'Resolving dependencies' line whenever I do pdk bundle install.

agxs avatar Jan 30 '23 13:01 agxs