A Step-by-Step Guide to Installing Docker Desktop on Ubuntu 24.04 LTS
Get Docker Desktop running on Ubuntu 24.04 LTS. This guide walks you through installing Docker Engine, setting up the repository, and getting the Desktop GUI up and running. Perfect for developers who want container management without living in the terminal.
Jamie
LogicCore Digital
Docker is one of those tools that's become essential for modern development. It packages your applications and all their dependencies into containers - think of them as standardized boxes that run the same way everywhere. No more "it works on my machine" headaches. Your app runs the same in development, staging, and production.
On Linux systems like Ubuntu, Docker Desktop gives you a graphical interface on top of the Docker Engine. Instead of managing everything from the command line, you get a dashboard where you can see your containers, images, and volumes at a glance. It's especially handy if you're not a terminal warrior or you want a visual way to manage your Docker workflows.
This guide walks you through getting Docker Desktop installed on Ubuntu 24.04 LTS (Noble Numbat) from scratch.
What You'll Need
Before we start, make sure your system meets these requirements:
- Ubuntu 24.04 LTS: You need the 64-bit version. Check with
lsb_release -aif you're not sure. - KVM Virtualization Support: Docker Desktop for Linux runs inside a lightweight virtual machine. Your processor needs to support hardware virtualization (Intel VT-x or AMD-V), and it must be enabled in your BIOS/UEFI settings.
- Check KVM Status: Run
sudo apt update && sudo apt install -y cpu-checker, thenkvm-ok. You should seeINFO: /dev/kvm existsandKVM acceleration can be used. - Enable if Needed: If virtualization isn't enabled, restart your computer, enter BIOS/UEFI setup (usually F2, F10, Del, or Esc during startup), find the virtualization setting (look for "Intel VT-x", "AMD-V", or "SVM Mode"), enable it, save, and reboot.
- Check KVM Status: Run
- Sudo Privileges: Your user account needs administrator rights to install packages and configure the system.
- Internet Connection: You'll be downloading Docker packages and the Desktop installer, so a stable connection is essential.
- System Resources: At least 4GB of RAM is recommended for a smooth experience.
Step 1: Update Your Package List
Always start by updating your system's package list. This ensures you're working with the latest package information and dependencies.
Open your terminal (Ctrl+Alt+T or search for "Terminal") and run:
sudo apt updateEnter your password when prompted. This refreshes the list of available packages from all configured repositories.
While you're at it, upgrade existing packages to their latest versions:
sudo apt upgrade -yThe -y flag automatically confirms the upgrade, so you won't be prompted for each package.
Step 2: Install Prerequisites for Docker Repository
We need a few packages that allow apt to securely access Docker's software repository over HTTPS. Install them with:
sudo apt install -y ca-certificates curl gnupg lsb-releaseThese packages handle:
ca-certificates: SSL certificate managementcurl: Downloading files from the webgnupg: GPG key management for verifying package authenticitylsb-release: Provides distribution information
Step 3: Add Docker's Official GPG Key and Repository
To ensure you're downloading authentic Docker software, we need to add Docker's official GPG key and repository. This verifies that packages haven't been tampered with.
First, create a directory for APT keyrings if it doesn't exist:
sudo install -m 0755 -d /etc/apt/keyringsDownload Docker's GPG key and save it:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpgMake sure the key file is readable:
sudo chmod a+r /etc/apt/keyrings/docker.gpgNow add Docker's official repository to your system's sources list:
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/nullThis command automatically detects your system architecture and Ubuntu version, then adds the appropriate repository configuration.
Step 4: Install Docker Engine and Related Tools
With the Docker repository configured, update your package list again to include Docker's packages:
sudo apt updateNow install the Docker Engine, command-line client, containerd runtime, and useful plugins:
sudo apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-pluginThis installs:
docker-ce: Docker Community Edition (the core engine)docker-ce-cli: Command-line interfacecontainerd.io: Container runtimedocker-buildx-plugin: Extended build capabilitiesdocker-compose-plugin: Docker Compose for multi-container applications
Step 5: Add Your User to the docker Group
By default, running docker commands requires sudo. To manage Docker as a regular user (which is much more convenient), add your user account to the docker group:
sudo usermod -aG docker $USERImportant: This change won't take effect until you log out and log back in, or run this command in your current terminal session:
newgrp dockerThe newgrp command applies the group change to your current session without requiring a full logout.
Step 6: Verify Docker Engine Installation
Let's confirm Docker Engine is installed and working correctly.
Check the installed version:
docker --versionYou should see output showing the Docker client and engine version numbers.
Now run a test container to make sure everything works:
docker run hello-worldIf successful, Docker will download a small test image and run it. You'll see a message starting with "Hello from Docker!" - this confirms the Docker Engine is functioning properly.
Step 7: Download Docker Desktop for Linux
Now for the Desktop application itself. You have two options:
Option 1: Download via Browser
- Open your web browser and go to: https://docs.docker.com/desktop/install/ubuntu/
- Find the download link for the Ubuntu DEB package and download it to your Downloads folder.
Option 2: Download via Terminal
Navigate to your Downloads directory and use wget:
cd ~/DownloadsImportant: Check Docker's official site for the latest version number and URL. The version in this example is a placeholder - replace it with the actual version:
wget https://desktop.docker.com/linux/main/amd64/docker-desktop-<version>-amd64.debReplace <version> with the actual version number from Docker's website (e.g., 4.27.0).
Step 8: Install the Docker Desktop Package
Stay in your Downloads directory (or navigate to where you saved the .deb file) and install it using apt:
sudo apt install ./docker-desktop-<version>-amd64.debReplace <version> with the actual version number from the filename you downloaded.
Using apt instead of dpkg is preferred because it automatically handles any missing dependencies.
If you encounter dependency issues, run:
sudo apt --fix-broken installThen try the installation command again.
Step 9: Launch and Verify Docker Desktop
Once installation completes, you can start Docker Desktop.
- Launch Docker Desktop: Find "Docker Desktop" in your Ubuntu application menu (usually in the Activities overview or application launcher) and click it.
- Accept the Agreement: On first launch, you'll be asked to accept the Docker Subscription Service Agreement. Read it and accept to continue.
- Wait for Startup: Docker Desktop takes a moment to start its background service and virtual machine. You should see the Docker whale icon appear in your system tray (usually in the top bar or dock area). The icon color indicates status:
- Gray: Starting
- Blue: Running
- Red: Stopped or error
- Open the Dashboard: Once the icon shows it's running (blue), click it to open the Docker Dashboard. This is your graphical interface for managing containers, images, volumes, networks, and settings.
Troubleshooting: Ubuntu 24.04 Namespace Restrictions
If Docker Desktop fails to start on Ubuntu 24.04, it might be due to changes in how Ubuntu restricts unprivileged namespaces. As a temporary workaround, run:
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
systemctl --user restart docker-desktopFor a permanent fix, you may need to adjust your system configuration. Check the Docker Community Forums for the latest solutions.
You're All Set
That's it! You've got Docker Desktop installed and running on Ubuntu 24.04 LTS. You now have both the powerful Docker Engine for command-line work and the Desktop GUI for visual management. You're ready to start building, running, and managing containers.
Helpful Resources
Want to dive deeper? These official resources are worth bookmarking:
- Docker Desktop for Ubuntu Documentation: https://docs.docker.com/desktop/install/ubuntu/
- Docker Engine Installation Guide: https://docs.docker.com/engine/install/ubuntu/
- Docker Getting Started Tutorial: https://docs.docker.com/get-started/
- Ubuntu Documentation: https://help.ubuntu.com/