-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docker desktop stopped working after upgrading Ubuntu from 23.10 to 24.04 #209
Comments
I have the same problem too. The Docker engine works fine though. It just I can not open the UI. |
Docker Desktop not working for me on Ubuntu 24.04 fresh install |
I freshly installed Ubuntu 24.04, and now Docker Desktop is not launching. I followed the official installation instructions (which worked for me on version 22.04), but it's still not successful. |
Same so I can confirm the official installation was completed successfully, but Docker Desktop is not launching in Ubuntu 24.04 Steps
|
Have you tried stracing the "stuck" command in order to find out what or when the exact sys-call or loop hangs? Not to mention Linux and not Windows cases, have you tried not using Docker Desktop at all but marvelous and fairly sufficient CLI or... TUI at least? |
Same error here |
Apologies for tagging but looking for some eyes here asap as my work is completely dependent on it. @christophermclellan, @aiordache, @bsousaa |
Same issue for me too. If I ran it from |
Seguimos triste, irei tentar instalar a versão 22 do ubunto para ver se é questão de compatibilidade do sistema, pois, a extensão do VSCODE segue com o mesmo erro. |
I did these steps and now it works fine.
sudo rm /etc/systemd/user/docker-desktop.service Reload Systemd systemctl --user daemon-reload 3.Unmask at the User Level (if still needed) systemctl --user unmask docker-desktop
systemctl --user start docker-desktop
systemctl --user status docker-desktop |
Unfortunately, this didn't help me, as the file was not in the folder. |
Hello, I encountered the same issue with the Docker Desktop GUI not loading. I managed to resolve it by navigating to /opt/docker-desktop/bin in the file system, right-clicking on com.docker.backend, and choosing 'Run'. This got Docker up and running for me. However, it seems to be stuck at the 'starting the Docker engine' loading screen now. Hope this helps anyone else facing the same problem! |
As mentioned above, have you tried stracing to define and locate the issue causer? I don't have such issues, so I - cannot. |
Hey @Arnispl I tried your solution but in my case, it just stuck at the starting stage. |
Can confirm this worked for me too. And I am getting the same result, loading screen with no interactivity. Tools like $ sudo systemctl is-active docker
active $ docker info
Client: Docker Engine - Community
Version: 26.1.0
Context: desktop-linux
Debug Mode: false
//... truncated
Server:
ERROR: Cannot connect to the Docker daemon at unix:///home/simon/.docker/desktop/docker.sock. Is the docker daemon running? Same output after running Tried using $ sudo dockerd
INFO[2024-04-29T20:14:51.791691352+01:00] Starting up
failed to start daemon, ensure docker is not running or delete /var/run/docker.pid: process with PID 2292 is still running So tried again $ sudo rm /var/run/docker.pid
$ sudo dockerd
INFO[2024-04-29T20:18:59.472233212+01:00] Starting up
INFO[2024-04-29T20:18:59.472991190+01:00] detected 127.0.0.53 nameserver, assuming systemd-resolved, so using resolv.conf: /run/systemd/resolve/resolv.conf
failed to start daemon: error while opening volume store metadata database (/var/lib/docker/volumes/metadata.db): timeout **** Restarted PC $ sudo systemctl status docker
● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; preset: enabled)
Active: active (running) since Mon 2024-04-29 20:28:07 BST; 1min 49s ago
TriggeredBy: ● docker.socket
Docs: https://docs.docker.com
Main PID: 2299 (dockerd)
Tasks: 18
Memory: 107.1M (peak: 108.2M)
CPU: 785ms
CGroup: /system.slice/docker.service
└─2299 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
Apr 29 20:28:06 simon-P330-server dockerd[2299]: time="2024-04-29T20:28:06.661678638+01:00" level=info msg="Starting up"
Apr 29 20:28:06 simon-P330-server dockerd[2299]: time="2024-04-29T20:28:06.665620700+01:00" level=info msg="detected 127.0.0.53 nameserver, assuming systemd-resolved, so using resolv.conf: /run/systemd/resolve/resolv.conf"
Apr 29 20:28:06 simon-P330-server dockerd[2299]: time="2024-04-29T20:28:06.744609074+01:00" level=info msg="[graphdriver] using prior storage driver: overlay2"
Apr 29 20:28:06 simon-P330-server dockerd[2299]: time="2024-04-29T20:28:06.748766463+01:00" level=info msg="Loading containers: start."
Apr 29 20:28:07 simon-P330-server dockerd[2299]: time="2024-04-29T20:28:07.234483033+01:00" level=info msg="Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used to set a preferred IP address"
Apr 29 20:28:07 simon-P330-server dockerd[2299]: time="2024-04-29T20:28:07.382076738+01:00" level=info msg="Loading containers: done."
Apr 29 20:28:07 simon-P330-server dockerd[2299]: time="2024-04-29T20:28:07.414289859+01:00" level=info msg="Docker daemon" commit=c8af8eb containerd-snapshotter=false storage-driver=overlay2 version=26.1.0
Apr 29 20:28:07 simon-P330-server dockerd[2299]: time="2024-04-29T20:28:07.414658784+01:00" level=info msg="Daemon has completed initialization"
Apr 29 20:28:07 simon-P330-server dockerd[2299]: time="2024-04-29T20:28:07.505601417+01:00" level=info msg="API listen on /run/docker.sock"
Apr 29 20:28:07 simon-P330-server systemd[1]: Started docker.service - Docker Application Container Engine. |
Attaching a full Pieces that look relevant:
|
✅ I was able to solve this issue with
It looks like an Electron and Chromium issue electron/electron#41066 UPD:
and it will make this setting permanent. It's a good idea to remove it when the fix to electron and Docker Desktop is released. |
Worked for me, just running $ sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
$ systemctl --user restart docker-desktop and docker deskop UI pops up immediately. Thank you! |
Related: moby/moby#47480 (rootless (non-dpkg): update docs and dockerd-rootless-setuptool.sh check for Ubuntu 24.04 (kernel.apparmor_restrict_unprivileged_userns)...) |
It worked for me, thanks!!! |
Worked for me too thanks. |
This operation works for me. Thanx !!! |
Thank you so much !! It's been hours and nothing has solved it and your answer saved me from staying up late |
I followed the instructions and now I can start Docker Desktop without running the commands. However, there is a security issue.
kernel.apparmor_restrict_unprivileged_userns = 0 |
This resolved my issue as well. Thank you |
Have you checked out references mentioned above?
|
This is very important to point out, thank you. The workaround should only be temporary and used with caution. On the flip side, the setting |
i forgot to provide my update that the below comment fixes the issue and is a kind of workaround. I am good to close the issue as it has unblocked my work. Thanks to all the participants in this thread especially @Spikhalskiy.
|
Am I the only one who feel that just using kernel.apparmor_restrict_unprivileged_userns=0 carte blanche is.. I don't know... a bad idea? I assume there was a reason Ubuntu added https://ubuntu.com/blog/ubuntu-23-10-restricted-unprivileged-user-namespaces 🤦 hey screw it, lets just disable our firewalls too open up localhost and let it rip!
Also worth reading. and also. |
You sound like we force you to disable something. We don’t. If you don’t need Docker Desktop or another Electron based app having the same issue, no reason to turn it off. If you have to use Docker Desktop and know another way around the issue - please share. For example, if you made an AppArmor profile that disables “restricted unprivileged user namespaces” only for Docker Desktop. From my point of view: Staying on Ubuntu 23.10 and earlier is not considered a severe security threat. At least I never saw such claims anywhere. And that versions don’t have this security feature or don’t have it ON. So we are probably fine to temporarily disable something that was just rolled out a couple of months ago and we lived alright without. Especially if it’s needed to unblock work tools. |
more like this is giving the worst advice first. also did you not see https://security.googleblog.com/2023/06/learnings-from-kctf-vrps-42-linux.html ? If thats true for K8 then I would assume its true for a great number of other services possibly running open. Also I'm gonna just leave this here for the rest of you |
thanks for finding a temporary fix. <3 |
im giving up on Linux. it had potential, but in the end its just a ton of jumping through rediculously stupid hoops in order to achieve (if youre lucky) basic Functionality |
It worked, but on the restart it did not open again. then rebooted and it worked |
After upgrading it to 4.32.0 problem still exsists although using command that are given below it works fine |
The following procedure persists across reboots:
Reboot after editing the file, and docker-desktop should start-up. |
It's been 4 months. Are there any plans to resolve this issue? |
Though its works by disabling appArmor. But I don't think its a proper solution. |
this issue persists in Fedora 40 desktop as well |
When are we going to have working Docker Desktop on Ubuntu 24.04 LTS? |
I use meta-ai to solve this error |
I tried to avoid disabling apparmor, but I kept having issues getting virtiofsd to be accepted so I disabled apparmor until this is resolved, having docker non-functional is not an option, I've gotten along fine with apparmor not in high gear so I'll wait for someone to make a better fix. |
Actually I was able to install and can work with it
Source: https://stackoverflow.com/a/73455413/3598880
|
This is the problem with the electron app itself |
you guys can check this solution here! it worked for me: https://askubuntu.com/questions/1511725/ubuntu-24-04-docker-desktop-is-not-starting#:~:text=The%20latest%20Ubuntu%2024.04%20LTS%20is%20not%20yet |
I think this is the best solution so far: https://askubuntu.com/a/1519662/1948654 |
https://dev.to/chandrashekhar/docker-desktop-is-not-working-on-ubuntu-2404-lts--2kpa Read this to resolve the issue of Docker-desktop. |
This is not the correct solution. As discussed before, this adds a blanket exception for all apps. Please refer to the previous stack overflow comments that describe how to make docker-desktop specific exceptions |
Same |
This is not the correct solution. As discussed before, this adds a blanket exception for all apps. Please refer to the previous stack overflow comments that describe how to make docker-desktop-specific exceptions Okay, sorry for the misunderstanding. I agree with your points, as you're more senior than me. |
this: |
LOL, this issue is going over 6 month now. but still no native solution from docker. its really funny. |
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) |
You can modify the /etc/sysctl.conf file or create a new configuration file under /etc/sysctl.d/ to make this change permanent. Here’s how: Open the Sysctl Configuration: Open the sysctl configuration file with a text editor. You can use nano or any text editor of your choice: sudo nano /etc/sysctl.conf kernel.apparmor_restrict_unprivileged_userns=0 Reload the Sysctl Configuration: Apply the changes by reloading the sysctl settings: sudo sysctl -p sysctl kernel.apparmor_restrict_unprivileged_userns systemctl --user restart docker-desktop this worked for me! |
Disabling this security globally is unacceptable. I've carved out an apparmor profile to unconfine Docker Desktop.
# Docker Desktop apparmor profile to unconfine
abi <abi/4.0>,
include <tunables/global>
profile docker-desktop /opt/docker-desktop/bin/com.docker.backend flags=(unconfined) {
userns,
} sudo apparmor_parser -r /etc/apparmor.d/docker-desktop
systemctl --user restart docker-desktop Do I have to mention that this does in fact work? @KatTomrushka |
I confirm that this solution works perfectly. Thanks @stevenlafl |
Description
I upgraded my Ubuntu OS from 23.10 to 24.04 via
sudo do-release-upgrade -d
command and the upgrade was successful without any issue. However, after the upgrade and system restart, when i start docker desktop, it did not respond to clicking the docker desktop icon via app launcher. Thinking it might be due to system upgrade i decided to uninstall docker desktop 4.29 and reinstalled the same version but still docker desktop was unable to start. I verified the logs located at ~/.docker/desktop/log/host and there were no entries with keyword 'error' or 'fail'. I verified the service docker-desktop was enabled and running via commandsystemctl --user status docker-desktop
but the commandsystemctl --user status docker
gave error "Unit docker.service could not be found".Reproduce
Expected behavior
Docker desktop should run with all my images and containers intact
docker version
docker info
Diagnostics ID
7D75123F-C60D-4C2F-A751-FAC458B49182/20240427092253
Additional Info
No response
The text was updated successfully, but these errors were encountered: