Problem with docker daemon after installing (and unnistaling) docker desktop

rw flag

I tried to install, docker desktop on my pc and after getting it, a project I had stopped working because of it I guess and docker. After supposedly uninstalling it with the following commands:

dpkg -l | grep -i docker

sudo apt-get purge -y docker-engine docker docker-ce docker-ce-cli docker-compose-plugin
sudo apt-get autoremove -y --purge docker-engine docker docker-ce docker-compose-plugin

sudo rm -rf /var/lib/docker /etc/docker
sudo rm /etc/apparmor.d/docker
sudo groupdel docker
sudo rm -rf /var/run/docker.sock

I tried again to install it with sudo apt-get install, I got a dependency issue with containerd and runc. I was able to "supposedly" install again with the commands:

sudo apt-get remove
sudo apt install docker-compose -y

But now I can't start a simple container because I get the following error no matter what I do:

docker: Cannot connect to the Docker daemon at unix:///home/mnemonic/.docker/desktop/docker.sock. Is the docker daemon running?.
See 'docker run --help'.

The docker daemon is indeed running, if I check it with systemctl status. I have checked the docker privileges with:

ls -l /home/mnemonic/.docker/desktop/docker.sock

And they are correct. I have created the docker user group and joined it. I have restarted and started the docker service dozens of times, just like my pc. I have manually started the docker daemon, to no avail.

Please I hope someone can help me, at this point I don't know what else to do I have been having this problem for days and honestly I don't want to format my whole pc because of a problem like this.

rw flag

Okay I found the solution. Apparently there is a json docker config file in ubuntu and other debian based distros that set docker "context" to "docker-desktop".

I have just deleted this 2 lines in $HOME/.docker/config.json:


The last one, "currentContext", was set to "docker-desktop", which was unninstalled.

Source for this solution was found here:

where you can found a user comment that redirects you to:

I love them.

I sit in a Tesla and translated this thread with Ai:


Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.