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.
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.
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:
How to Make sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0 Persistent on Ubuntu 24.04
If you’re running Ubuntu 24.04 and have encountered the issue where Docker Desktop won’t start due to the need to run sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0 every time you start the machine, here’s a solution to make this change persistent.
Steps to Make the Change Persistent:
Open the sysctl kernel configuration file:
Run the following command to open the sysctl configuration file:
sudo nano /etc/sysctl.conf
Add the configuration:
At the end of the file, add this line:
kernel.apparmor_restrict_unprivileged_userns=0
Apply the changes immediately (optional):
After saving the file, you can apply the changes without rebooting by running:
sudo sysctl -p
Explanation:
The /etc/sysctl.conf file is used to configure kernel parameters that persist across reboots. By adding this parameter to the file, the system will automatically apply it every time it starts, without requiring you to manually run the command again.
This way, Docker Desktop should be able to start without needing you to run the command manually after every reboot.
Thank you for sharing, but there are better solutions recommended on GitHub linked in th topic I linked above. I should have closed this topic as the other is about the same problem on the same OS, so I close it now.
I haven’t tried as I don’t have Ubuntu 24.04 desktop installed anywhere yet, but if those solutions are working, hopefully it will be mentioned in the documentation instead of completely disabling a security feature.