"docker desktop starting" takes forever.. docker.service not found, linux 22.04

  • Issue type : Docker Starting takes forever, after installation
  • OS Version/build : Linux 22.04
  • App version : 4.12, installed from debian package
  • Steps to reproduce:

Hello there, so I just follow the installation steps Install on Ubuntu | Docker Documentation, plus also the pre-requisite Install Docker Engine on Ubuntu | Docker Documentation, and also add my local user to the docker group as mention in the post-install link, I also did log out and log back it, or did the newgrp docker, still no luck

then, I simply did systemctl --user start docker-desktop which opens my docker, I click accept, and it just hangs there in “Docker Desktop starting…”

Here are some maybe related logs:

  1. sudo docker run hello-world
docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.

  1. docker run hello-world
docker: Cannot connect to the Docker daemon at unix:///home/name/.docker/desktop/docker.sock. Is the docker daemon running?.
See 'docker run --help'.
  1. ls -la /var/run/docker.sock
srw-rw---- 1 root docker 0  9月 26 22:53 /var/run/docker.sock
  1. docker version
    sometimes it outputs this
Error response from daemon: dial unix docker.raw.sock: connect: no such file or directory
Client: Docker Engine - Community
 Cloud integration: v1.0.29
 Version:           20.10.18
 API version:       1.41
 Go version:        go1.18.6
 Git commit:        b40c2f6
 Built:             Thu Sep  8 23:11:43 2022
 OS/Arch:           linux/amd64
 Context:           desktop-linux
 Experimental:      true

sometimes this

Cannot connect to the Docker daemon at unix:///home/name/.docker/desktop/docker.sock. Is the docker daemon running?
Client: Docker Engine - Community
 Cloud integration: v1.0.29
 Version:           20.10.18
 API version:       1.41
 Go version:        go1.18.6
 Git commit:        b40c2f6
 Built:             Thu Sep  8 23:11:43 2022
 OS/Arch:           linux/amd64
 Context:           desktop-linux
 Experimental:      true

  1. service docker status or sudo systemctl restart docker
    Unit docker.service could not be found.

Any help is greatly appreciated, I’ve been stuck for ~2days, try debugging this :pray:

1 Like

Same issue for me :frowning:

Same issue. Do you find any solution ?

for whoever stumble upon this, and wonder if there’s solution, I just reinstall the ubuntu 22.04, then follow the same steps, and magically works :person_shrugging:

here’s an issue I open on the same topic, hope it’ll be useful

first I’ve done this section manage-docker-as-a-non-root-user
than check if you service docker is running?
service --status-all
if your docker service isn’t listed
that mean that if you run: sudo service docker start
Output: Failed to start docker.service: Unit docker.service not found.

check it out this link Install Docker Engine on Ubuntu
i solved the problem running this command:
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin.

than check if docker service is listed in service --status-all

May I ask how your post correlates with the OP’s post?

I am not sure how installing docker-ce helps with problems related to Docker Deskstop for linux, where the docker engine is running inside a utility vm (which is why no systemd unit exists on the host).

sorry, what you mean with OP? Hope I haven’t done anything wrong posting what works for me

OP=original poster.

There is no need to be sorry, there must a reason you felt your response belongs in this topic… and maybe you thought so because you didn’t understand something yourself, or I didn’t understand your intentions. So please share why you think the response is the right solution for the problem.

Don’t get me wrong, It’s a great response if the problem “docker.service not found” would be in the context of docker-ce.

But since this topic is in the context of Docker Desktop for Linux, the response might confuse users that actually use Docker Desktop for Linux, as suddenly they would have two docker installations, and might experience a context problem where they suddenly don’t see image, containers, and volumes depending on the currently active context (=which of both docker versions is configured to be use as backend) even though everything is running and reachable.

1 Like

Once I followed the instruction of how to install docker desktop i faced with the same problem and I solved it doing what was shown in docker documentation, I’m new in using forum, and not very practical, for that I thought maybe I did something wrong.

The error above happen to me because once I’ve installed docker desktop, i figured out that I couldn’t run docker service through CLI, even if the command docker -v was working.

Now I’ve understood what you mean thank you very much

Thank you for explaining, now it makes sense why you posted it. But like I wrote: it will confuse users that blindly follow suggestions without understanding the implications of what they do.

The op already had the problem i was mentioning:

As you can see the root user accesses docker-ce (socket: unix:///var/run/docker.sock) , while the unprivileged user uses docker desktop (socket: unix:///home/name/.docker/desktop/docker.sock).

Btw, those commands you quoted are correct for a docker-ce installation, where the Docker Engine is installed on the Linux host. Like I wrote earlier, Docker Desktop for Linux runs the Docker Engine in a utility vm, and as such the expectation those commands would succeed on the host are incorrect.

Personally, I would run docker-ce on a Linux system, as it’s the natural habitat of Docker without any limitations. I would only Docker Desktop on Windows and MacOS where Docker always requires on a vm, as Docker depends on Linux Kernel features that are not available otherwise.

But back to topic: actually this topic should have been about how to track down the issue and fix the root cause.