Search code examples
linuxdockerubuntudocker-desktop

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


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 Docker Desktop. 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


Solution

  • 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.