There are many install instructions for installing Docker Desktop on Ubuntu.
BUT! There is one problem when you try to install Docker Desktop on an Ubuntu derived distro like Linux Mint and it can throw beginners.

Here are the complete steps to install Docker Desktop on Linux Mint and I will point out where the gotcha is.

These instruction are based on the official instructions at https://docs.docker.com/desktop/install/ubuntu/
You may want to check the original for instructions for deleting an existing docker desktop.
I will assume you are starting from a fresh install.

CPU Check

We need to check if your CPU supports virtualization.
First install a CPU checker.

ubuntu@goodboy:~# sudo apt-get update
ubuntu@goodboy:~# sudo apt-get upgrade
ubuntu@goodboy:~# sudo apt-get install cpu-checker

Load the KVM module manually,

ubuntu@goodboy:~# sudo modprobe kvm
ubuntu@goodboy:~# sudo modprobe kvm_intel # Intel processors
ubuntu@goodboy:~# sudo modprobe kvm_amd   # AMD processors

Check KVM can be used,

ubuntu@goodboy:~# sudo kvm-ok
INFO: /dev/kvm exists
KVM acceleration can be used

Check if the module is enabled,

ubuntu@goodboy:~# lsmod | grep kvm
kvm_intel            368640    5
kvm                 1028096    1 kvm_intel

Add your user to the KVM group,

ubuntu@goodboy:~# sudo usermod -aG kvm $USER

Add Docker Repository in Linux Mint

We’re going to update the local package index first,

ubuntu@goodboy:~# sudo apt-get update

then install the required packages,

ubuntu@goodboy:~# sudo apt-get install ca-certificates curl gnupg lsb-release
ubuntu@goodboy:~# sudo mkdir -m 0755 -p /etc/apt/keyrings
ubuntu@goodboy:~# curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
ubuntu@goodboy:~# 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

!!!WARNING!!!

Now this is where you will fail. Take a look at the newly created docker.list sources file.

ubuntu@goodboy:~# cat /etc/apt/sources.list.d/docker.list 
deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu   vera stable

It says vera which is the current linux mint release name.
There is NO vera docker desktop repo.
You must change this to the ubuntu equivalent release, which is jammy.
Note this issue for future versions of linux mint that you install, you must find the equivalent base Ubuntu distributions name.
Change this in the docker.list file.

ubuntu@goodboy:~# cat /etc/apt/sources.list.d/docker.list 
deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu   jammy stable

With this minor issue addressed we can move on to install Docker Desktop on Linux Mint.

Install Docker (Partially Optional Step)

Docker Desktop is layer that runs on top of Docker. Docker Desktop will install Docker during it’s setup process… BUT… for some reason it won’t create systemd service unit files, which is fine if you don’t need them.

If you skip this ‘Install Docker’ step and go straight to ‘Install Docker Desktop’ section the install process will install the needed docker programs.

If you want to, for example, ask other processes on your system to wait for docker to start you will need service files and so should install Docker first before running the Docker Desktop install.

Run the following command to install docker,

ubuntu@goodboy:~# sudo apt-get update
ubuntu@goodboy:~# sudo apt-get install docker*

If you check /lib/systemd/system/ you will find docker service files.

ubuntu@goodboy:~# ls docker*
docker-registry.service  docker.service  docker.socket

For reference, the /etc/systemd/system directory in Linux Mint is another location for system-wide systemd service files, and it takes precedence over the files found in /lib/systemd/system.

*I only add this section as sometimes it is important to have a docker.service unit file to reference from another service unit file… for example, if you follow the unbound tutorial you need to wait for docker to be up and running with a pihole container before starting the unbound service. This is accomplished by using the command After=docker.service in the unbound.service file. The docker.service file is placed in /lib/systemd/system

Install Docker Desktop

ubuntu@goodboy:~# sudo groupadd docker
ubuntu@goodboy:~# sudo usermod -aG docker $USER
ubuntu@goodboy:~# groups ubuntu

Now wget/download the latest deb install file for docker desktop.
It’s version 4.12 at the time of writing.
Check for the latest version here, https://docs.docker.com/desktop/install/ubuntu/

ubuntu@goodboy:~# wget -c https://desktop.docker.com/linux/main/amd64/docker-desktop-4.21.0-amd64.deb

Again, update your local repo index which will include packages from the docker desktop repo and then install the .deb file.

ubuntu@goodboy:~# sudo apt-get update
ubuntu@goodboy:~# sudo apt-get install ./docker-desktop-4.21.0-amd64.deb

NOTE: You will see the following error. You can ignore this.

N: Download is performed unsandboxed as root, as file '/home/user/Downloads/docker-desktop.deb' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)
One thought on “Install Docker Desktop On Linux Mint”

Leave a Reply

%d bloggers like this: