Table of Contents
  • Home
  • /
  • Blog
  • /
  • Step-by-step Procedure to Install Docker Desktop on Linux
January 8, 2024
|
6m

Step-by-step Procedure to Install Docker Desktop on Linux


Step By Step Procedure To Install Docker Desktop On Linux

This is a comprehensive guide to install Docker Desktop on Linux, especially catering to Ubuntu and similar distributions. Docker Desktop on Linux runs a Virtual Machine (VM) and uses a custom docker context desktop-linux on startup, so images and containers deployed on the Linux Docker Engine (before installation) are not available in Docker Desktop for Linux.

Lets begin this How to guide learning abut the Docker Desktop, its prerequisites, and finally how to install Docker Desktop on different Linux Distribution.

What is Docker Desktop?

Docker Desktop is a tool for MacOS and Windows systems for building, sharing, and running Docker containers. It supports the latest technologies, such as cloud-native applications and provides a unified platform for managing all of your Dockerized applications. With Docker Desktop, you can easily build containerized applications, develop in isolation, and collaborate with others. Whether youre a developer or an IT admin, Docker Desktop provides a fast and simple way to get up and running with containerizing your app!

Key features of Docker Desktop include:

  1. Easy installation and setup: Docker Desktop provides an easy-to-use graphical user interface (GUI) and a command-line interface (CLI) for creating and managing Docker containers and services.

  2. Integration with Docker Hub: Docker Hub is a cloud-based registry service that allows you to link to code repositories, build your images, test them, store compiled images, and distribute them.

  3. Kubernetes integration: Docker Desktop also includes a standalone Kubernetes server and client, as well as Docker CLI integration. This allows you to use Docker CLI commands to run your applications in a Kubernetes environment.

  4. Developer-friendly features: Docker Desktop allows you to leverage Dockers features in your development process. This includes easy creation and management of Docker images, containers, networks, and volumes.

  5. Multi-platform support: Docker Desktop supports development for both Windows and Linux platforms. This is achieved through the use of a Hyper-V VM (for Windows) and a HyperKit VM (for Mac), allowing you to build, run, and test Linux containers directly from your Windows or MacOS workstation.

System Requirements to Install Docker Desktop on Linux

Since Docker Desktop runs Docker container on Hyper V virtualisation, KVM support is must to have to install Docker Desktop on Linux. Because of this it is practically challenging to run Docker Desktop on Nested Virtualization environment.  We recommend to install Docker Desktop natively on the host Linux machine rather then on a Linux VM.

Before you install Docker Desktop on a Linux machine, please ensure you net all these requirements:

  • 64-bit kernel and CPU support for virtualization.

  • KVM virtualization support.

  • QEMU must be version 5.2 or newer.

  • systemd init system.

  • Gnome, KDE, or MATE Desktop environment.

  • At least 4 GB of RAM.

  • Enable configuring ID mapping in user namespaces

How to Install Docker Desktop on Linux?

Once you ensure you are met with all the requirements, its time to start the installation of Docker Desktop on Linux.  Decker Desktop packages are available for these Linux distributions.

  1. Ubuntu: Download latest DEB package for Ubuntu.

  2. Debian: Download latest DEB package for Debian.

  3. Fedora: Download latest RPM packag for Fedora.

  4. Arch: Download the Arch package from the release page. Full release is not published for Arch at the time of writing this post. Docker Desktop package available for Arch is in experimental stage.

Before we directly jump in to the installation.  Lets verify KVM support as it is mandatory prerequisite to install Docker Desktop on Linux. 

Time needed: 10 minutes.

KVM support

Step 1: Enable KVM Virtualization

* Run $ modprobe kvm to load the KVM module manually.
* Depending on your processor, run either
$ modprobe kvm_intel (for Intel processors) or $ modprobe kvm_amd (for AMD processors).
* Check if the KVM modules are enabled by running
$ lsmod | grep kvm.

Step 2: Set up KVM Device User Permissions

* Check the ownership of /dev/kvm by running $ ls -al /dev/kvm.
* Add your user to the kvm group to access the kvm device by running
$ sudo usermod -aG kvm $USER. Log out and log back in to re-evaluate your group membership.

Step 3: Prepare for Installation

* Ensure you have a 64-bit version of your Linux distribution (Ubuntu, Debian, Fedora).
* Install gnome-terminal for non-Gnome Desktop environments by running
$ sudo apt install gnome-terminal.
* Uninstall any existing versions of Docker Desktop by running
$ sudo apt remove docker-desktop. For a complete cleanup, remove configuration and data files as described in the Docker guide.

Step 4: Install Docker Desktop

* Download the correct package for your Linux distribution.
Ubuntu: Download latest
DEB package for Ubuntu.
Debian: Download latest
DEB package for Debian.
Fedora: Download latest
RPM packag for Fedora.
* Install it with the corresponding package manager.
For Ubuntu, you can use the command:
$ sudo apt install ./docker-desktop-<version>-<arch>.deb
For Debian, you can use the command:
$ sudo apt install ./docker-desktop-<version>-<arch>.deb
For Fedora, you can use the command:
$ sudo dnf install ./docker-desktop-<version>-<arch>.rpm

Step 5: Launch Docker Desktop

* Search for Docker Desktop in your Applications menu and open it, or run $ systemctl –user start docker-desktop in a terminal.
* To enable Docker Desktop to start on login, select
Settings > General > Start Docker Desktop when you log in from the Docker menu, or run $ systemctl –user enable docker-desktop in a terminal.

Step 6: Verify Installation

* When a new version of Docker Desktop is released, the Docker UI shows a notification.
* Download the new package and run
$ sudo apt-get install ./docker-desktop-<version>-<arch>.deb to upgrade Docker Desktop.
Debian: $ sudo apt-get install ./docker-desktop-<version>-<arch>.deb
fedora: $ sudo dnf remove docker-desktop && $ sudo dnf install ./docker-desktop-<version>-<arch>.rpm

Thats it! This is how you should install Docker Desktop on Linux.

We hope this comprehensive guide to install Docker Desktop on Linux lets you learn how to install Docker Desktop on different Linux distributions.  We are going to end this post for now, we will cover more information about the Docker in the up coming articles. Please keep visiting thesecmaster.com for more such technical information. Visit our social media page on Facebook, Instagram,  LinkedIn, Twitter, Telegram, Tumblr, & Medium and subscribe to receive information like this. 

You may also like these articles:

Arun KL

Arun KL is a cybersecurity professional with 15+ years of experience in IT infrastructure, cloud security, vulnerability management, Penetration Testing, security operations, and incident response. He is adept at designing and implementing robust security solutions to safeguard systems and data. Arun holds multiple industry certifications including CCNA, CCNA Security, RHCE, CEH, and AWS Security.

Recently added

Tutorials

View All

Learn More About Cyber Security Security & Technology

“Knowledge Arsenal: Empowering Your Security Journey through Continuous Learning”

Cybersecurity All-in-One For Dummies - 1st Edition

"Cybersecurity All-in-One For Dummies" offers a comprehensive guide to securing personal and business digital assets from cyber threats, with actionable insights from industry experts.

Tools

Featured

View All

Learn Something New with Free Email subscription

Subscribe

Subscribe