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.

Let’s 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 you’re 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 Docker’s 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.
See also  New Biometric Indicators!

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, it’s 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.  Let’s verify KVM support as it is mandatory prerequisite to install Docker Desktop on Linux.

Time needed: 10 minutes

KVM support

  1. 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.

  2. 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.

  3. 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.

  4. 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

  5. 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.

  6. 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

See also  There is an advisory from Google for those who are using the Chrome browser. Google discovered 10 new 0-day vulnerabilities in the Chrome browser and asked to update the browser as soon as possible. 

Leave a Reply

Your email address will not be published. Required fields are marked *