desktop-linux icon indicating copy to clipboard operation
desktop-linux copied to clipboard

Docker Desktop 4.12 stuck at "Docker Desktop Starting" on Ubuntu 22.04 after installation

Open orvindemsy opened this issue 2 years ago • 15 comments

  • [x] I have tried with the latest version of Docker Desktop
  • [ ] I have tried disabling enabled experimental features (I can't access settings)
  • [x] I have uploaded Diagnostics
  • Diagnostics ID: 3dd6b7fc-d3b4-4f9d-8847-ca89cd46ccfc/20220928095150 (uploaded)

Expected behavior

Docker Desktop starts

Actual behavior

stuck at "Docker Desktop starting"

Information

  • Linux distro: Ubuntu
  • Distro version: 22.04
  • Docker Desktop Version: 4.12

Initially had Ubuntu 20.04, upgrade to 22.04 then install Docker Desktop. docker version gives Cannot connect to the Docker daemon at unix:///home/odemsy/.docker/desktop/docker.sock. Is the docker daemon running?

Steps to reproduce the behavior

  1. Go to the linux docs doing all the steps from the requirement steps, mainly kvm thing, ensuring systemd is there, Qemu version is okay, etc.
  2. Go to the ubuntu installation guide, doing all the steps, including the set up Docker package repo, install debian package, install from apt
  3. Open DD via terminal systemctl --user start docker-desktop or click through application
  4. Agree, then "Docker Desktop starting" ...

orvindemsy avatar Sep 28 '22 10:09 orvindemsy

Am getting the same error here as well.

TheBraveByte avatar Oct 04 '22 12:10 TheBraveByte

Am getting the same error here as well.

TheBraveByte avatar Oct 04 '22 12:10 TheBraveByte

@dev-ayaa how did you install ubuntu 22.04? did you also upgrade it through cli ? Because that's what I did, and I thought something is off with it.

I couldn't find a solution, so I reinstall 22.04, followed all the same steps, and it magically works.

orvindemsy avatar Oct 05 '22 09:10 orvindemsy

@orvindemsy well I had Ubuntu 22.04 installed for a while now 5month ago. And the installation was just done the normal way. Am currently thinking of trying the docker desktop previous version v4.8.2. If that did not work as well I will just stick with the CLI only.

TheBraveByte avatar Oct 05 '22 10:10 TheBraveByte

@orvindemsy The logs in the diagnostics bundle show an error related to the filesharing setup:

setting up ID maps for virtiofsd namespace: retrieving subordinate UID range: no range for <USER> found in /etc/subuid

In system requirements, the Enable configuring ID mapping in user namespaces step contains the link to the filesharing setup page https://docs.docker.com/desktop/faqs/linuxfaqs/#how-do-i-enable-file-sharing

aiordache avatar Oct 21 '22 10:10 aiordache

@orvindemsy The logs in the diagnostics bundle show an error related to the filesharing setup:

setting up ID maps for virtiofsd namespace: retrieving subordinate UID range: no range for <USER> found in /etc/subuid

In system requirements, the Enable configuring ID mapping in user namespaces step contains the link to the filesharing setup page https://docs.docker.com/desktop/faqs/linuxfaqs/#how-do-i-enable-file-sharing

I have the same problem on Ubunutu 22.04 with kernel 5.15. After add the following instruction in subuid and subgid.

<username>:<start of id range>:<id range size>

This problem have been solved. Thanks for your help!

yapinxxx avatar Oct 24 '22 07:10 yapinxxx

Had the same problem today. Docker worked with Ubuntu 22.04 few weeks back and today it was stuck with the message: "Docker Desktop stopped..."

The problem was I ahd another VM running in the background. To check if it is the case for you, simply run:

ps aux | egrep -i '[v]irtualbox|[v]mware'

Just stopped this VM and now Docker launches perfectly.

twysto avatar Oct 25 '22 12:10 twysto

I have the same problem after installation of docker-desktop. There are two docker contexts. One is the default, its docker endpoint is unix:///var/run/docker.sock. I can call any rootless docker function with default context. But when I tried to start docker-desktop, it automatically switched the current context to another one -- desktop-linux. Its endpoint is unix:///home/username/.docker/desktop/docker.sock. The rootless docker engine can't connect to this daemon, and my docker-desktop always stuck in starting.

How could I solve that?

susu1210 avatar Oct 28 '22 05:10 susu1210

@susu1210 Can you provide a diagnostics bundle please? You could also check ~/.docker/desktop/log/host/com.docker.driver.amd64-linux.log. When the VM fails to start, that's the usual place where the error is logged.

aiordache avatar Oct 28 '22 13:10 aiordache

@aiordache I didn't use any VM, but just a single Ubuntu OS. I tried two days to uninstall and reinstall docker, but the error remained the same. So I reinstalled Ubuntu, now it was fixed...

susu1210 avatar Oct 28 '22 13:10 susu1210

I ran into this same problem when I switched from cli docker to docker desktop. Turned out it was because my subgid and subuid were pointing to my real ids (from ldap) as the starting id. It worked for the cli version but caused exceptions with the desktop version. Changing the start id to a much lower id fixed the docker desktop startup.

malachid avatar Dec 12 '22 15:12 malachid

Diagnostic ID: ead53e1b-c92f-4eb2-b02a-6ef382c41507/20221222153731 I am using POP_OS 22.04 (Ubuntu), Docker Desktop 14.15.0 and Vagrant 2.3.4

I started up a VM using vagrant and Docker Desktop would not start. I destroyed the VM and docker desktop started fine. So with Docker Desktop working, now the vagrant VM will not start. I opened the Virtualbox GUI and the VM has a message: Guru Meditation Session Locked.

So apparently docker desktop and vagrant have a problem working together.

The error message is the same when I am running vagrant, as it was before I set the subuid and subgid. I was unable to get Docker Destop running at all until I found the link from a comment above: https://docs.docker.com/desktop/faqs/linuxfaqs/#how-do-i-enable-file-sharing

echeadle avatar Dec 22 '22 03:12 echeadle

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 https://docs.docker.com/engine/install/ubuntu/#set-up-the-repository 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

os3albert avatar Feb 24 '23 11:02 os3albert

There hasn't been any activity on this issue for a long time. If the problem is still relevant, mark the issue as fresh with a /remove-lifecycle stale comment. If not, this issue will be closed in 30 days.

Prevent issues from auto-closing with a /lifecycle frozen comment.

/lifecycle stale

docker-robott avatar May 25 '23 01:05 docker-robott

I falloed this garbage instructions and nothing works neither using 10000 as starting range: If /etc/subuid and /etc/subgid are missing, they need to be created. Both should contain entries in the form - ::. For example, to allow the current user to use IDs from 100 000 to 165 535:

grep "$USER" /etc/subuid >> /dev/null 2&>1 || (echo "$USER:100000:65536" | sudo tee -a /etc/subuid)

grep "$USER" /etc/subgid >> /dev/null 2&>1 || (echo "$USER:100000:65536" | sudo tee -a /etc/subgid)

To verify the configs have been created correctly, inspect their contents:

echo $USER exampleuser

cat /etc/subuid exampleuser:100000:65536

cat /etc/subgid exampleuser:100000:65536

In this scenario if a shared file is chowned inside a Docker Desktop container owned by a user with a UID of 1000, it shows up on the host as owned by a user with a UID of 100999. This has the unfortunate side effect of preventing easy access to such a file on the host. The problem is resolved by creating a group with the new GID and adding our user to it, or by setting a recursive ACL (see setfacl(1)) for folders shared with the Docker Desktop VM. I still recieving this error:

Ensure '/etc/subuid' is set up according to instructions at https://docs.docker.com/faqs/linuxfaqs/#ho-do-i-enable-file-sharing

Run-c0de avatar Feb 24 '24 00:02 Run-c0de