See this askubuntu
- Update and install dependencies
sudo apt-get update sudo apt-get install ca-certificates curl gnupg lsb-release - Set up the Docker repository
sudo mkdir -p /etc/apt/keyrings curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null - Install the docker engine
sudo apt update sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin - Install Docker Desktop (You must download the deb package first from step 2 from the following document: Install Docker Dekstop)
sudo apt-get install ./docker-desktop-<version>-<arch>.deb
Possibly you'll need a sudo apt --fix-broken install.