Docker permission denied


Issue: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.35/containers/json: dial unix /var/run/docker.sock: connect: permission denied

Solutions:

The errors messages tell you that your current user can't access the docker engine, since you lack of the permission to access the unix socket to communicate with the engine.

For temp solution: you can "sudo the command" to get the permission as root.

It's recommended to fix the issue by adding the current user to the "docker" group. then completely log out and log back in.

   sudo usermod  -a -G docker $USER

 

轉自:https://techoverflow.net/2017/03/01/solving-docker-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket/


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM