Docker desktop not working on Ubuntu 24.04

Hi,

I had Ubuntu 22 and never had problems with Docker or Docker desktop. Upgraded to 24.04 yesterday and now it just doesn’t want to work anymore.

I uninstalled and installed several times but nothing seems to work.

When I run sudo docker run hello-world I get the right output.

When I run 'docker run hello-world` it just hangs.

Then I adjusted the permissions for my user according to here: Linux post-installation steps for Docker Engine | Docker Docs and then I could run docker run hello-world and I would see success.

But when I run /opt/docker-desktop/bin/com.docker.diagnose check I get a lot of errors:

[PASS] DD0039: are KVM user permissions configured?
[PASS] DD0018: does the host support virtualization?
[FAIL] DD0001: is the application running? Docker is not running
[FAIL] DD0017: can a VM be started? vm has not started: failed to open init.log: open /home/xxx/.docker/desktop/log/vm/init.log: no such file or directory
[FAIL] DD0016: is the LinuxKit VM running? prereq failed: is the application running?
[FAIL] DD0004: is the Docker engine running? prereq failed: is the LinuxKit VM running?
[PASS] DD0015: are the binary symlinks installed?
[FAIL] DD0031: does the Docker API work? prereq failed: is the Docker engine running?
[PASS] DD0013: is the $PATH ok?
[FAIL] DD0034: is Context set to a Docker Desktop context? CLI context is set to docker-ce engine
[FAIL] DD0003: is the Docker CLI working? prereq failed: is the Docker engine running?
[FAIL] DD0038: is the connection to Docker working? prereq failed: is the Docker engine running?
[FAIL] DD0014: are the backend processes running? prereq failed: is the LinuxKit VM running?
[FAIL] DD0007: is the backend responding? prereq failed: are the backend processes running?
[FAIL] DD0009: is the vpnkit API responding? prereq failed: are the backend processes running?
[FAIL] DD0010: is the Docker API proxy responding? prereq failed: are the backend processes running?
[FAIL] DD0030: is the image access management authorized? prereq failed: is the Docker engine running?
[PASS] DD0037: is the virtiofs setup correct?
[WARN] DD0036: is the credentials store configured correctly? Error: password store is empty. Try "pass init".

[PASS] DD0033: does the host have Internet access?
[PASS] DD0039: are KVM user permissions configured?
[PASS] DD0018: does the host support virtualization?
[WARN] DD0001: is the application running? Docker is not running
[WARN] DD0017: can a VM be started? vm has not started: failed to open init.log: open /home/sharif/.docker/desktop/log/vm/init.log: no such file or directory
[WARN] DD0016: is the LinuxKit VM running? prereq failed: is the application running?
[WARN] DD0004: is the Docker engine running? prereq failed: is the LinuxKit VM running?
[PASS] DD0015: are the binary symlinks installed?
[WARN] DD0031: does the Docker API work? prereq failed: is the Docker engine running?
[WARN] DD0032: do Docker networks overlap with host IPs? prereq failed: does the Docker API work?

now I also tried to open Docker desktop by clicking on the app icon in the app menu and nothing happens.

Also good to know is that as soon as I click the app icon to open Docker desktop, somehow the permissions of my user are reset again and I can’t run docker run hello-world again.

could somebody help please?

You should not do major version upgrades without testing the upgrade in another environment, unless it is about a dev VM which you can reinstall any time. It seems Ubuntu 24.04 is not mentioned in the documentation yet in the prerequisites section, so it might not be supported yet or if the documentation is not up to date, then something happened during the OS upgrade which is not handled by Docker Desktop.

That is not needed in case of Docker Desktop. Otherwise it would be mentioned in the installation guide of the Desktop, but this is one of the points of using the Desktop. It will run as your user so the socket willl be owned by you.

I also updated to Ubuntu 24.04 and I am having this exact issue. Docker desktop doesn’t come up but the cli both docker and compose are working.

This is a temporary workaround to the issue:

sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0

then restart docker-desktop.service

sudo systemctl --user restart docker-desktop

This change is not persistent, so you need to redo it at every reboot.

1 Like

Thank you for sharing the answer in this topic too. I forgot to leave the link of the other topic here, so I do it now if anyone wants to read the rest of the comments: