Closed takuto-h closed 5 years ago
When I setup a VM with vagrant-proxyconf 2.0.5 and run docker as a non-root user in it, I got the following message:
WARNING: Error loading config file:/etc/docker/config.json - stat /etc/docker/config.json: permission denied
It seems that this is because the permission of /etc/docker/config.json is set to 0600, which is the default permission of Tempfile.
/etc/docker/config.json
0600
Tempfile
https://github.com/tmatilai/vagrant-proxyconf/blob/v2.0.5/lib/vagrant-proxyconf/action/configure_docker_proxy.rb#L95
https://docs.ruby-lang.org/en/2.6.0/Tempfile.html
It needs to be 0644 for non-root docker users.
0644
@takuto-h - Thank you for fixing this, this looks good to me. Merging.
Released 2.0.6 with your changes. Thanks again!
When I setup a VM with vagrant-proxyconf 2.0.5 and run docker as a non-root user in it, I got the following message:
It seems that this is because the permission of
/etc/docker/config.json
is set to0600
, which is the default permission ofTempfile
.https://github.com/tmatilai/vagrant-proxyconf/blob/v2.0.5/lib/vagrant-proxyconf/action/configure_docker_proxy.rb#L95
https://docs.ruby-lang.org/en/2.6.0/Tempfile.html
It needs to be
0644
for non-root docker users.