Got permission denied while trying to connect to the Docker daemon socket
After I installed docker on the AWS ubuntu 20.04 server I typed in some docker commands. For example:
But I got an error : 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.24/containers/json: dial unix /var/run/docker.sock: connect: permission denied.
Please suggest me how to solve this problem
You need to give /var/run/docker.sock read permission by executing the command:
sudo chmod 666 /var/run/docker.sockBlue Jame Dec 29 2020