Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

docker-desktop does not launch on ubuntu [Failed to start docker-desktop.service: Unit docker-desktop.service is masked] [closed]

I experienced this issue on Ubuntu 22.04 Jammy.

After installing Docker Desktop, following the instructions on the official documentation, and meeting system requirements including having virtualization support, I am unable to launch the Docker Desktop GUI.

I tried launching it from the applications menu but nothing. As an alternative to launching Docker Desktop from the official documentation, I opened the terminal to run:

systemctl --user start docker-desktop

but I got this error:

Failed to start docker-desktop.service: Unit docker-desktop.service is masked

like image 826
davidn Avatar asked Sep 03 '25 14:09

davidn


2 Answers

Update March 2024:

The previously opened issue has been closed. This is because the workaround (from the original answer) has been accepted as the solution

Original answer:

It turns out this is an open issue on the docker desktop-linux (Docker Desktop for Linux) repository on GitHub.

The solution is to unmask the service and enable it.

Solution:

$ file /etc/xdg/systemd/user/docker-desktop.service

Running the command above, you should notice that the file is a symlink to /dev/null

Delete the file:

$ sudo rm /etc/xdg/systemd/user/docker-desktop.service

And then enable the service for the user:

$ systemctl --user enable docker-desktop

credit to @ptarud comment on the issue.

like image 126
davidn Avatar answered Sep 05 '25 04:09

davidn


Another GitHub solution that worked for me after trying many solutions.

Follow these steps:

  1. Try to run Docker Desktop using the command line.

    systemctl --user start docker-desktop

  2. If not started, then use this command instead.

    systemctl --user force-reload docker-desktop

I hope it works for you guys as well!

Credits: TahirIqbalGit

like image 45
Muhammad Ali Imran Avatar answered Sep 05 '25 05:09

Muhammad Ali Imran



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!