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 Ubuntu | Docker Docs, plus also the pre-requisite Ubuntu | Docker Docs, 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:
sudo docker run hello-world
docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.
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'.
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).
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.
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.