Docker Desktop for Linux Desktops
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
- Installation
- Launch and Setup docker desktop
- Explore docker desktop
- Extensions (Beta feature)
- Uninstall docker desktop
- 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
- 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
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
- 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).
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
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
Let’s Explore docker desktop
- 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.
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.
4. Settings
Under setting we can allot resources (CPU, Memory, Swap and disk usage).
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,
- Anchore — Container image scanning tool
- Disk Usage — Used to monitor disk usage of docker resources and cleanup the disks.
- Snyk — Another image scanning tool
- Portainer — Dashboard to manage docker environments
Uninstall docker desktop
- Stop and remove all containers using desktop app or CLI
- 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