On an Ubuntu 22.04 system, whenever I run any docker
command, it prints out an error:
Cannot connect to the Docker daemon at unix:///home/<username>/.docker/desktop/docker.sock. Is the docker daemon running?
If I check with systemctl status docker
, it shows that the Docker daemon is running, however.
Running sudo docker ...
works, but I'd prefer to not prefix every Docker command with sudo
. I've tried many of the approaches in How to fix docker: Got permission denied issue, including adding my user to the docker
group and relaxing the permissions on /var/run/docker.sock
, but I still get this error.
What might be causing this?
no usernames for https://index.docker.io/v1/
". But usingsudo
fixes it