Home > Enterprise >  Docker issues and errors
Docker issues and errors

Time:09-17

i tried a lot of time to enter the command docker ps -a in terminal i am getting this error this error:

my Operating system: "ubuntu 22.04"

Cannot connect to the Docker daemon at unix:///home/ali/.docker/desktop/docker.sock. Is the docker daemon running?

but when i try this command again with root access the command works fine but the command not working without root access

CodePudding user response:

This is the correct behaviour.

If you don't want to type sudo docker all the time you can either add your user to the docker group but I don't recommend that (it is not secure) or you can create an alias like alias docker='sudo docker'. Your user need to be in the sudoers list, obviously.

  • Related