Ad

Docker Non-root Access: Error Loading Config File:stat /home/wu/.docker/config.json

- 1 answer

I finished the docker installation with non-root access, namely

1.define a docker user group
2.add my current user to the docker group

pass the test

docker run --rm hello-world

but when I start to provision my docker containers, somewhere in the procedure I got the error:

Error loading config file:stat /home/user/.docker/config.json:Permission Denied

seems to be docker is trying to access some resources but got denied

What is happening here? How could I fix this ?

thx

Ad

Answer

I've got the same error after upgrate from 1.4 to latest. Fix: manually create .docker/config.json ( put empty json object there {} ) and set ownership like this :

-rw-r--r-- 1 myuser docker /home/myuser/.docker/config.json
Ad
source: stackoverflow.com
Ad