Docker Desktop for Linux Desktops

Navratan Lal Gupta
5 min readMay 14, 2022

--

Finally, Docker desktop is live for Linux Desktops.

Docker desktop is a GUI dashboard/app for docker which enables users to manage and monitor containerized applications and micro-services.

Docker desktop for Windows and Mac has been there for long time. It was long pending for Linux desktops, which has been launched on Dockercon 2022. This also comes with an additional feature docker extensions which enables users to extend the features of docker desktop by adding docker-provided or third-party ad-ons.

Lets hang-out for a while with our new guest in Linux universe.

Contents

  1. Installation
  2. Launch and Setup docker desktop
  3. Explore docker desktop
  4. Extensions (Beta feature)
  5. Uninstall docker desktop
  6. Conclusion — My personal opinion

Installation

I installed docker desktop on my PC running on 8GB Memory, 4 CPUs with Elementary OS 6.1. Elementary OS is Debian(Ubuntu)-based OS, So same steps will also work on Ubuntu and other Debian-based Linux OS.

This application can be installed on any Debian-based or RHEL-based Linux desktops with below system requirements:

  • CPU support for virtualization
  • KVM virtualization support (Docker desktop for Linux runs on VM)
  • QEMU version 5.2 or higher
  • 64-bit Kernel
  • Systemd init system
  • Atleast 4GB of RAM
  1. Check pre-requisites

Check QEMU version. If not available, This will get installed as part of docker desktop installation.

qemu-system-x86_64 --version

Load KVM modules.

modprobe kvm
modprobe kvm_intel # For Intel processor
modprobe kvm_amd # For AMD processor

Check if KVM modules are enabled

lsmod | grep kvm

Add your user to kvm group to allow access to KVM device (/dev/kvm)

ls -al /dev/kvm
sudo usermod -aG kvm USERNAME
Add user to kvm group

Once user is added to group, logout and log back in.

2. Download docker desktop’s Debian package file (v4.8.1)

curl -LO https://desktop.docker.com/linux/main/amd64/docker-desktop-4.8.1-amd64.deb

3. Install docker desktop

sudo apt install ./docker-desktop-4.8.1-amd64.deb

If you already have Docker Engine installed, Its recommended to stop the docker engine.

To stop docker engine,

sudo systemctl stop docker docker.socket containerd
sudo systemctl disable docker docker.socket containerd # To prevent it from starting automatically during boot up

Launch and Setup Docker Desktop

  1. Launch Docker desktop

Launch docker desktop from your application menu and read and accept its terms and conditions (or feel free to decline and get back to your work, if you don’t agree with their terms).

Terms and service agreement

Allow few minutes to docker desktop to initialize itself.

2. Switch docker context

Once docker desktop is installed and launched, a context is created to interact with docker desktop. We need to switch the context to desktop-linux.

List all contexts

docker context ls

Switch context

docker context use desktop-linux
Docker contexts

5. Create password store

Docker desktop stores credentials in password store which is encrypted using private key.

Generate key

gpg --generate-key

Initialize password store

pass init KEYID # Key id can be obtained from output while generating key
Create password store

Let’s Explore docker desktop

Docker desktop dashboard
  1. Login to docker hub

You can login to docker hub from Sign in option at top right of window.

Once logged in, you can browse images pushed into you repos under Images section.

2. Run a container

You can run a container directly from Home section using any of available featured images. To run any other images we need to pull image from registry using CLI (This feature is not available in docker desktop. Docker is right place to ask, why ?)

Once image is pulled into local repository, You can run container directly from desktop app. You can see all images in local and remote repositories under Images section.

Container images list
Run a container

3. Manage running container

Logs of a running container can be directly viewed from desktop app by clicking on container name from list.

Inspect, Delete and stats of container can be checked under Containers section.

Containers list
Container logs

4. Settings

Under setting we can allot resources (CPU, Memory, Swap and disk usage).

Resource Settings

Other settings includes Subnet settings, Enable single node K8s cluster, extension settings.

Extensions

Extensions is the new feature included in Docker desktop. This is in beta stage. It enables users to extend and add new feature in docker desktop using docker-provided or third-party adons.

Some good extensions I found userful are,

  1. Anchore — Container image scanning tool
  2. Disk Usage — Used to monitor disk usage of docker resources and cleanup the disks.
  3. Snyk — Another image scanning tool
  4. Portainer — Dashboard to manage docker environments
Extensions marketplace
Extension: Disk usage
Extension: Anchore
Extension: Anchore — Image vulnerabilities list
Extension: Portainer

Uninstall docker desktop

  1. Stop and remove all containers using desktop app or CLI
  2. Uninstall using package manager
sudo apt remove docker-desktop

2. Remove context

docker context ls
docker context use default
docker context rm desktop-linux

3. Remove docker desktop related files [OPTIONAL]

rm -rfv ~/.docker/desktop

Conclusion — My personal opinion

  • It has very few functionalities
  • Many docker operations missing in desktop app. User need to switch to CLI every now-and-then
  • Docker extensions is a good inclusion which will help extend its functionality beyond what docker provides.
  • It can be used for managing running containers like monitoring, stopping, starting and checking logs.

If I had to go for a GUI app to manage docker or containerized apps, I would rather prefer Portainer.

If you like to know more about Docker desktop for Linux, Refer below link:

https://docs.docker.com/desktop/linux

Thank You

Navratan Lal Gupta

Linux Shots

--

--

Navratan Lal Gupta

I talk about Linux, DevOps, Kubernetes, Docker, opensource and Cloud technology. Don't forget to follow me and my publication linuxshots.