Docker-desktop does not work on Debian

Interesting thought about permissions. So I had completely purged docker again from my system and this time I reinstalled it but after pre-creating the directory, just to make sure:

mkdir 700 ~/.docker
chown $USER:$USER ~/.docker

After the installation I started the app and everything looks ok in the UI - it says docker engine is running. But I again try docker context ls and it shows just:

 ➜ docker context ls
NAME        DESCRIPTION                               DOCKER ENDPOINT               ERROR
default *   Current DOCKER_HOST based configuration   unix:///var/run/docker.sock

The weird thing is that my .docker/contexts/meta file shows a desktop-linux context:

➜ cat ~/.docker/contexts/meta/fe9c6bd7a66301f49ca9b6a70b217107cd1284598bfc254700c989b916da791e/meta.json
{"Name":"desktop-linux","Metadata":{"Description":"Docker Desktop","otel":{"OTEL_EXPORTER_OTLP_ENDPOINT":"unix:///home/l/.docker/desktop/user-analytics.otlp.grpc.sock"}},"Endpoints":{"docker":{"Host":"unix:///home/l/.docker/desktop/docker.sock","SkipTLSVerify":false}}}

So it doesn’t appear to be a permissions issue (?), but I’m also quite confused as to why there is a desktop-linux entry in this directory. If I try to docker pull hello-world it just says the same old Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?. I also tried systemctl --user start docker-desktop just to make sure, even though it’s clearly running.

On your suggestion I tried docker context create desktop-linux, and then switched, but it’s still unable to connect to the daemon.

I also found your post, which gave some extra clues. Interestingly, I see this:

l ~
🗴 docker context inspect --format '{{ .Endpoints.docker.Host }}'
unix:///var/run/docker.sock

l ~
➜ file /var/run/docker.sock
/var/run/docker.sock: cannot open `/var/run/docker.sock' (No such file or directory)

If I am understanding correctly, this file should exist on my system. Also, you mention that many users skip the post-install. In the guide (at least for debian), it has a small section that starts “The RPM package includes a post-install script…”. I do wonder if this is a mistake in the documentation as RPM is quite irrelevant for a debian-based distribution, which is the focus on that page… So could it be that there are some post-install steps missing from that guide? I did previously try adding my user to the docker group, which is still in place, but I did not do anything relating to symlinks that I can now see mentioned in the RPM section there…