【Docker】Troubleshooting

Posted by 西维蜀黍 on 2022-04-04, Last Modified on 2023-05-02

Got permission denied while trying to connect to the Docker daemon socket

$ docker run hello-world
docker: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/create": dial unix /var/run/docker.sock: connect: permission denied.
See 'docker run --help'.

Solve by

$ sudo chmod 666 /var/run/docker.sock

Reference