Cannot get Docker Desktop to run on Ubuntu 24.04

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

7 Likes

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.

2 Likes

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

1 Like

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.