I use Ubuntu 20.04 and I use docker to run images. When I installed and ran the docker command for the 1st time, the following error occurred in the shell.
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
I ran sudo chmod 766 /var/run/docker.sock
and it worked. However, whenever I restart the system, I have the permission denied again and I need to run chmod again.
How do I resolve this issue? I want to have root access always when running docker