Cannot get Docker Desktop to run on Ubuntu 24.04

Hi, been at this a few days now.

I upgraded to Ubuntu 24.04. I tried installing Docker Desktop and that would not run. No errors, just hangs.

Many many cleans and reinstalls later. Even docker hello-world wont run.

The error message I get is that the daemon wont start.

Cannot connect to the Docker daemon at unix:///home/greg/.docker/desktop/docker.sock. Is the docker daemon running?.

Shouldnt this be looking at /var/run/docker ?

docker info
Client:
Version: 24.0.7
Context: desktop-linux
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version: v0.14.0
Path: /usr/libexec/docker/cli-plugins/docker-buildx

Server:
ERROR: Cannot connect to the Docker daemon at unix:///home/greg/.docker/desktop/docker.sock. Is the docker daemon running?
errors pretty printing info

  • Have a 64-bit version of either the latest LTS version (Ubuntu Jammy Jellyfish 22.04) or the current non-LTS version (Ubuntu Mantic Minotaur 23.10). Docker Desktop is supported on x86_64 (or amd64) architecture.

Ubuntu 24.04 is still beta and not mentioned among the supported operating systems. I still haven’t installed Ubuntu 24.04 so I have no idea whether Docker Desktop should work on it or not.

When you start the GUI? Did you try to check system logs?

The GUI doesnt start. Thats the problem.

Doesn’t just show “loading” but doesn’t start at all?

Either way, without logs there is nothing I can say unfortunately. And I don’t use DD for Linux enough to know what could go wrong. Have you tried Docker Desktop for Linux on supported Ubuntu versions as well?

Yes. I used Docker Desktop on previous version of Ubuntu no problem

Any luck here yet? I have the exact same problem. Ubuntu 24.04 Docker Desktop doesn’t start. When clicking on the icon, no reaction. No Loading or errors or any reaction.

Yeah. Docker desktop not working yet on ubuntu 24.04. Please help

I have the same issue and I just upgraded to ubuntu 24.04
I want to roll back to 23 and try again

event the docker-cli is not working in ubuntu24.04

Same for me
 I think we will have to wait for a new version?

I had the same error with Docker Engine so the cause might not be the same, but I’d previously set the service to depend on a network mount, which had seemingly been renamed during the upgrade. Try starting it from the terminal and see if it complains about a mount point not being found:

$ sudo service docker start
Failed to start docker.service: Unit media-share.mount not found.

If that’s the case, you can run systemctl list-units --type=mount to get the updated name, then edit /etc/systemd/system/multi-user.target.wants/docker.service and edit the [Unit] block appropriately. There’s probably a way to reload changes but I did a reboot and docker came straight back up.

Hope that helps someone!

That’s what I don’t think you can with Docker Desktop and even if you could, that is a virtual machine so you wouldn’t see the logs of the daemon.

I see many of you have problems, but have any of you checked whether Docker Desktop is supported on Ubuntu 24.04 before you upgraded to it? See my previous reply

And where does it mention Ubuntu 24.04?

Its doesnt but they would not just drop docker support without a statement to that effect.

It doesn’t mean they dropped it, but since the new LTS has many changes, they might have delayed a release that supports it. 24.04 is still pretty new, although they could have started to support it while it was beta. I don’t know the reasons, but you can join the discussion on GitHub:

Will do thanks a lot

I have also tried with 24.04 LTS version. The GUI is not starting at all. When It will be available or how to resolve this error.

Docker desktop won’t work and it probably needs an update. But docker engine works but ONLY with sudo. So from what I have experienced docker ps will give you an error that can’t connect to docker service but sudo docker ps works.

I think it has something to do with the new security features of Ubuntu 24.04 here https://ubuntu.com/blog/whats-new-in-security-for-ubuntu-24-04-lts. It’s just sad that Docker didn’t even try to fix this between the time of the beta release and the final release. They had 2 weeks time and nobody at Docker thought about testing it on 24.04?

Depends on the context. See docker context --help. If you have Docker DEsktop and Docker CE, you need to switch between contexts. If your user is not in the docker group, then indeed, you need to use sudo. When you use sudo, it will always use the default context since Docker Desktop’s context will not be available as root.

We don’t know if they tried or not. The best that all of you can do is join the conversation in the issue on GitHub. And again, next time don’t upgrade an OS when you don’t know if all of the requirements are supported on the new one :slight_smile:

But thanks for the link. I will read it later after work.

I have no Docker Desktop installed. Just the Docker engine. And yes I have added my user to the docker group and after adding my user, docker commands without sudo work. But when I restart it somehow gets removed again. I built my containers without sudo and for that session, I can could work with them(start, stop etc.) but only for that session. As soon as I restart, it’s only accessible with sudo privileges.

Dockers documentation specifically says 24.04 is supported.

Its broken, plain and simple.

You wrote about Docker Desktop in your first post and I quoted the documentation where Ubuntu 24.04 is not mentioned. Then I quoted my post in which I quoted the documentation. The topic is in the Docker Desktop for Linux category, so we talk about Docker Desktop. Should it be supported or not, Ubuntu 24.04 is not mentioned in the documentation. Which is at least suspicious. But I noted that I have no idea whether the developers intended to support the latest release and it is a bug or they just forgot to update the documentation. So this part is not as plain as simple actually, but the fact that the version is not mentioned in the documentation is still a fact.

Docker CE is another story. That works differently, so it should be discussed in a different topic even if the root cause of both is systemd. One starts a virtual machine, and the other starts multiple components on the host directly. I know that the GUI sometimes show “Docker Engine is starting”, but that means it is starting in the virtual machine which so the solution will not be the same. The topic title could be confusing when someone doesn’t read the category in which the topic is in so I’m going to change it to make it more obvious that here we are talking about the Desktop.

@sharifgh Then let’s continue this discussion in a new topic, because the installation guide of Docker on Ubuntu indeed includes Ubuntu 24.04, so that should work. Although even if Docker Desktop is not installed now, but it was, it is also possible that the context settings were not reset so you still need to switch context. If you open a new topic, I can give you some ideas. I can’t install Docker Desktop on Ubuntu 24.04 now to help, but I can try to install Docker CE in a virtual machine later.

The temporary workaround is

$ sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
$ systemctl --user restart docker-desktop

https://www.reddit.com/r/docker/comments/1c9rzxz/comment/l1u2h3x/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button

Thank you for sharing the link. Good to know that it was a question 8 days ago on Reddit, but it links to the same issue on GitHub I recommended to follow. I don’t know if it is a coincidence that you share it minutes after I change the topic title to similar to the one on Reddit. :slight_smile:

Yes I removed the engine completely and installed Docker Desktop and ran those commands mentioned by @nadz13 and it works.

You think it’s a good idea to make it persistent in /etc/sysctl.conf or we should deal with it till docker comes up with an update?

Thanks for providing the work around, it was very helpful.

I just downloaded 4.29.0 version of docker desktop and it seems to be working out of the box

Good to see that there is a working solution! I would say you could make that setting persistent if you don’t want to run it every time you reboot your machine, but write a note to yourself somewhere to remember you did it and check the documentation from time to time. If the same solution is added to the installation instruction, you can keep it. If a new Docker Desktop release can solve it automatically, remove the setting from the file and let Docker Desktop solve it for you.
By the way I tested Docker Engine without the Desktop today and worked without any issue on Ubuntu 24.04, so it was indeed a Docker Desktop issue.

Thanks!!! It works for me too!!

There is another topic open on Docker Support requesting this. It would be cool if we all reported the problem there too to speed up the process.

Today , after a reboot , its stopped working again. Sorry, false hope.

added kernel.apparmor_restrict_unprivileged_userns=0
to /etc/sysctl.conf fixed the problem on ubuntu 24.04 lts

Thanks, it works for me too

I experimented it. it doesn’t work on ubuntu 24.04, I am having this problem from the day first.
someone needs to fix the issue
 please do something about this


I am attaching the crash report in my system
 you can debug using this.

you need to run the command again

I have also tried with 24.04 LTS version. Docker doesn’t work on Ubuntu 24.04. I mean docker won’t start.

It works for me too ! Thanksssssssssssss !!!

Thank you, this tempory workaround works greatly for running docker desktop on ubuntu 24.04 LTS, even if it needs to be run after every reboot.

I recommend to run it manually, cause it is about disabling a new security features from Ubuntu. It doesn’t sound great to disable it by default for everyting after each reboot just to run docker, which I think will fix that soon.

I am running Ubuntu 24 with Docker-desktop-4.30.0-amd64.deb

The workaround gets it to start but I don’t see any of the containers I see in docker ps -a

for example

partyk1d24@igoy:~$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
0d37886050e0 e784f4560448 “/docker-entrypoint.
” 6 days ago Up 14 minutes 0.0.0.0:80->80/tcp, :::80->80/tcp, 0.0.0.0:443->443/tcp, :::443->443/tcp nginx
458c5c5ce77d abeda236c4f0 “/init” 6 days ago Up 14 minutes 0.0.0.0:8123->8123/tcp, :::8123->8123/tcp homeassistant
77ff82956627 3d9dd5a7695e “/opt/docker-entrypo
” 6 days ago Up 14 minutes (healthy) 0.0.0.0:1883->1883/tcp, :::1883->1883/tcp, 0.0.0.0:8000->8000/tcp, :::8000->8000/tcp, 0.0.0.0:8080->8080/tcp, :::8080->8080/tcp hivemq

But none in docker desktop

Today I decided to upgrade Ubuntu 24.04 (2024-06-14), and I had a problem with the desktop. Your contribution helped me, thank you.

Thank you it woks for me :blush:

Seems to start, but I can not sign in! Anyone with the same problem and/or solution?

Cheers,
Leendert
The Netherlands

And can you sign in in docker-desktop?
I can’t.

Cheers,
Leendert
The Netherlands

I was fighting the same problem for about 2 hours until I found the solution here: Install Docker Desktop on Ubuntu | Docker Docs

inside the pre-requisites NOTE, says you need to run the following command at least once:
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0

Best

I used these commands after installing:

$ sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
$ systemctl --user restart docker-desktop

read this to resolve issue.

I saw you shared it on GitHub too. Aren’t the previous two solutions better?

These suggest creating a new apparmor profile instead of disabling the unprivileged usernamespaces.

agree with your point, but I found it useful for me.

Are there palns. Roadmap to official suport Docker, Docker desktop for Ubuntu 24.04 LTS.

The referenced workarounds all shut of AppAmmor. I not going to do that for isolation reasons.

Please, check the links I shared in my previous post until the the latest LTS ubuntu is supported.

Thank You
I messed that post

Have a Nice day

Here is the official response as well

https://github.com/docker/desktop-linux/issues/209#issuecomment-2410820399

Thank you for your interest and patience. We want to let you know that we’re actively working on the Linux Ubuntu 24.04, and it’s already in the testing phase. It’s coming soon, though we don’t have a confirmed release date just yet.

We’ll keep you updated as progress continues!

Roadmap item: docker/roadmap#655 (comment)

Awesome, thanks for the update!

The official documentation requires : “Have a 64-bit version of either the LTS version Ubuntu Jammy Jellyfish 22.04, or the current non-LTS version”. The latest non LTS version is 24.10 but I encounter the exact same symptoms (docker desktop hanging and nothing happens) but the proposed workarounds work. So I guess the problem also occurs on 24.10.

What is the the current non-LTS version mentioned here ? This is confusing. I cannot find non LTS latest version of 22.04 and after.

Since the “current non-LTS” version is newer then 24.04 LTS, the current non-LTS version is not supported either. The documentation was just not changed to remove the non-LTS version part and the note below that does not meniton it either. I agree it could be confusing.

There is no “non-LTS version of 22.04”. 22.10 would be the next non-LTS version, but It is not supported by Ubuntu either. I’m not 100% sure, but I think the change that made Ubuntu incompatible with Docker Desktop was introduced in Ubuntu 23.10. Previous versions could work but I would not upgrade to a non-LTS version especially which is nont supported even by the maintainers of Ubuntu.

sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0

is required for 24.04

Just in case you didn’t notice, Docker Desktop 4.35 now supports Ubuntu 24.04

https://docs.docker.com/desktop/install/linux/ubuntu/#prerequisites

  • Have an x86-64 system with Ubuntu 22.04, 24.04, or the latest non-LTS version.

Note that as of October 29, the docker desktop download link provided on the installation page still points to the old version of docker desktop, and will fail to install on 24.04. Instead of using the provided link, head over to the release notes page and download using the provided link:

True. I checked it. Thanks for sharing.

For the Ubuntu 24+ version, there are changes with how it handles the permssion.

Thanks to ton of searching, trying and failing, I got the perfect solution.

Use this article - Rootless mode | Docker Docs