Install Docker Desktop on Linux (2024)

Docker Desktop terms

Commercial use of Docker Desktop in larger enterprises (more than 250employees OR more than $10 million USD in annual revenue) requires apaidsubscription.

This page contains information about general system requirements, supported platforms, and instructions on how to install Docker Desktop for Linux.

Important

Docker Desktop on Linux runs a Virtual Machine (VM) which creates and uses a custom docker context, desktop-linux, on startup.

This means images and containers deployed on the Linux Docker Engine (before installation) are not available in Docker Desktop for Linux.

For more information seeWhat is the difference between Docker Desktop for Linux and Docker Engine.

Important

For commercial use of Docker Engine obtained via Docker Desktop within larger enterprises (exceeding 250 employees OR with annual revenue surpassing $10 million USD), apaid subscription is required.

Docker Desktop for Linux provides a user-friendly graphical interface that simplifies the management of containers and services. It includes Docker Engine as this is the core technology that powers Docker containers. Docker Desktop for Linux also comes with additional features like Docker Scout and Docker Extensions.

Installing Docker Desktop and Docker Engine

Docker Desktop for Linux and Docker Engine can be installed side-by-side on thesame machine. Docker Desktop for Linux stores containers and images in an isolatedstorage location within a VM and offerscontrols to restrictits resources. Using a dedicated storagelocation for Docker Desktop prevents it from interfering with a Docker Engineinstallation on the same machine.

While it's possible to run both Docker Desktop and Docker Engine simultaneously,there may be situations where running both at the same time can cause issues.For example, when mapping network ports (-p / --publish) for containers, bothDocker Desktop and Docker Engine may attempt to reserve the same port on yourmachine, which can lead to conflicts ("port already in use").

We generally recommend stopping the Docker Engine while you're using Docker Desktopto prevent the Docker Engine from consuming resources and to prevent conflictsas described above.

Use the following command to stop the Docker Engine service:

$ sudo systemctl stop docker docker.socket containerd

Depending on your installation, the Docker Engine may be configured to automaticallystart as a system service when your machine starts. Use the following command todisable the Docker Engine service, and to prevent it from starting automatically:

Switching between Docker Desktop and Docker Engine

The Docker CLI can be used to interact with multiple Docker Engines. For example,you can use the same Docker CLI to control a local Docker Engine and to controla remote Docker Engine instance running in the cloud.Docker Contextsallow you to switch between Docker Engines instances.

When installing Docker Desktop, a dedicated "desktop-linux" context is created tointeract with Docker Desktop. On startup, Docker Desktop automatically sets itsown context (desktop-linux) as the current context. This means that subsequentDocker CLI commands target Docker Desktop. On shutdown, Docker Desktop resetsthe current context to the default context.

Use the docker context ls command to view what contexts are available on yourmachine. The current context is indicated with an asterisk (*);

$ docker context lsNAME DESCRIPTION DOCKER ENDPOINT ...default * Current DOCKER_HOST based configuration unix:///var/run/docker.sock ...desktop-linux unix:///home/<user>/.docker/desktop/docker.sock ... 

If you have both Docker Desktop and Docker Engine installed on the same machine,you can run the docker context use command to switch between the Docker Desktopand Docker Engine contexts. For example, use the "default" context to interactwith the Docker Engine:

$ docker context use defaultdefaultCurrent context is now "default"

And use the desktop-linux context to interact with Docker Desktop:

$ docker context use desktop-linuxdesktop-linuxCurrent context is now "desktop-linux"

Refer to theDocker Context documentation for more details.

Docker provides .deb and .rpm packages from the following Linux distributionsand architectures:

Platformx86_64 / amd64
Ubuntu
Debian
Fedora

An experimental package is available forArch-based distributions. Docker has not tested or verified the installation.

Docker supports Docker Desktop on the current LTS release of the aforementioned distributions and the most recent version. As new versions are made available, Docker stops supporting the oldest version and supports the newest version.

General system requirements

To install Docker Desktop successfully, your Linux host must meet the following general requirements:

  • 64-bit kernel and CPU support for virtualization.
  • KVM virtualization support. Follow theKVM virtualization support instructions to check if the KVM kernel modules are enabled and how to provide access to the KVM device.
  • QEMU must be version 5.2 or later. We recommend upgrading to the latest version.
  • systemd init system.
  • Gnome, KDE, or MATE Desktop environment.
    • For many Linux distros, the Gnome environment does not support tray icons. To add support for tray icons, you need to install a Gnome extension. For example,AppIndicator.
  • At least 4 GB of RAM.
  • Enable configuring ID mapping in user namespaces, seeFile sharing.
  • Recommended:Initialize pass for credentials management.

Docker Desktop for Linux runs a Virtual Machine (VM). For more information on why, seeWhy Docker Desktop for Linux runs a VM.

Note

Docker does not provide support for running Docker Desktop for Linux in nested virtualization scenarios. We recommend that you run Docker Desktop for Linux natively on supported distributions.

KVM virtualization support

Docker Desktop runs a VM that requiresKVM support.

The kvm module should load automatically if the host has virtualization support. To load the module manually, run:

$ modprobe kvm

Depending on the processor of the host machine, the corresponding module must be loaded:

$ modprobe kvm_intel # Intel processors$ modprobe kvm_amd # AMD processors

If the above commands fail, you can view the diagnostics by running:

$ kvm-ok

To check if the KVM modules are enabled, run:

$ lsmod | grep kvmkvm_amd 167936 0ccp 126976 1 kvm_amdkvm 1089536 1 kvm_amdirqbypass 16384 1 kvm

Set up KVM device user permissions

To check ownership of /dev/kvm, run :

$ ls -al /dev/kvm

Add your user to the kvm group in order to access the kvm device:

$ sudo usermod -aG kvm $USER

Sign out and sign back in so that your group membership is re-evaluated.

Important

Make sure you meet the system requirements outlined earlier and follow the distro-specific prerequisites.

  1. Download the correct package for your Linux distribution and install it with the corresponding package manager.

    • Install on Debian
    • Install on Fedora
    • Install on Ubuntu
    • Install on ArchBy default, Docker Desktop is installed at /opt/docker-desktop.
  2. Open your Applications menu in Gnome/KDE Desktop and search for Docker Desktop.

    Install Docker Desktop on Linux (1)

  3. Select Docker Desktop to start Docker.
    The Docker menu (Install Docker Desktop on Linux (3)) displays the Docker Subscription Service Agreement.

  4. Select Accept to continue. Docker Desktop starts after you accept the terms.

    Note that Docker Desktop will not run if you do not agree to the terms. You can choose to accept the terms at a later date by opening Docker Desktop.

    For more information, seeDocker Desktop Subscription Service Agreement. We recommend that you also read theFAQs.

Where to go next

  • ExploreDocker's core subscriptions to see what Docker can offer you.
  • Get started with Docker.
  • Explore Docker Desktop and all its features.
  • Troubleshooting describes common problems, workarounds, how to run and submit diagnostics, and submit issues.
  • FAQs provide answers to frequently asked questions.
  • Release notes lists component updates, new features, and improvements associated with Docker Desktop releases.
  • Back up and restore data provides instructionson backing up and restoring data related to Docker.
Install Docker Desktop on Linux (2024)
Top Articles
Latest Posts
Article information

Author: Msgr. Refugio Daniel

Last Updated:

Views: 6041

Rating: 4.3 / 5 (54 voted)

Reviews: 93% of readers found this page helpful

Author information

Name: Msgr. Refugio Daniel

Birthday: 1999-09-15

Address: 8416 Beatty Center, Derekfort, VA 72092-0500

Phone: +6838967160603

Job: Mining Executive

Hobby: Woodworking, Knitting, Fishing, Coffee roasting, Kayaking, Horseback riding, Kite flying

Introduction: My name is Msgr. Refugio Daniel, I am a fine, precious, encouraging, calm, glamorous, vivacious, friendly person who loves writing and wants to share my knowledge and understanding with you.