Keywords: Docker Desktop | Ubuntu Installation | Dependency Resolution
Abstract: This article provides an in-depth analysis of the "docker-ce-cli not installable" dependency error encountered when installing Docker Desktop on Ubuntu systems. By examining the architectural differences between Docker Desktop and Docker Engine, it explains that the root cause lies in the absence of Docker's official repository configuration. The article presents a complete solution, including steps to configure the Docker repository, update package lists, and correctly install Docker Desktop, while also explaining permission warnings that may appear during installation. Furthermore, it discusses considerations for co-existing Docker Desktop and Docker Engine installations, offering comprehensive technical guidance for developers deploying Docker Desktop in Linux environments.
Problem Context and Error Analysis
When attempting to install Docker Desktop on Ubuntu systems, many users encounter a common dependency error: docker-desktop : Depends: docker-ce-cli but it is not installable. This error typically occurs when directly using the apt-get install command to install downloaded .deb package files, as shown in the following example:
root@dockeru:/home/work/Downloads# apt-get install ./docker-desktop-4.8.1-amd64.deb
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'docker-desktop' instead of './docker-desktop-4.8.1-amd64.deb'
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help resolve the situation:
The following packages have unmet dependencies:
docker-desktop : Depends: docker-ce-cli but it is not installable
E: Unable to correct problems, you have held broken packages.
The core issue is that the system cannot locate the docker-ce-cli package because Ubuntu's default software repositories do not contain Docker's official packages. Docker Desktop, as a complete desktop application, depends on Docker Engine's command-line interface components, which must be obtained through Docker's official repository.
Architectural Relationship Between Docker Desktop and Docker Engine
To understand the nature of this problem, it is essential to clarify the differences and connections between Docker Desktop and Docker Engine. According to Docker's official documentation, these two components can coexist on the same Linux machine but have different architectural designs and use cases.
Docker Engine is the traditional Docker daemon and command-line tools, primarily installed via system package managers. Docker Desktop, in contrast, is a complete desktop application that includes Docker Engine, Kubernetes cluster, user interface, and additional development tools. Docker Desktop uses separate storage locations to avoid conflicts with any Docker Engine installations that might already exist on the system.
While it is technically possible to run both Docker Desktop and Docker Engine simultaneously, doing so may cause issues in certain scenarios. Therefore, Docker Desktop's installation package is designed to be installed independently but still requires access to Docker's official repository to obtain necessary dependency components.
Solution: Configuring Docker's Official Repository
The key step to resolving the docker-ce-cli not installable error is to properly configure Docker's official APT repository. The following is the complete configuration process:
- Install Required Dependency Packages: First, ensure the system has the necessary tool packages installed
sudo apt install -y ca-certificates curl gnupg lsb-release
<ol start="2">
sudo mkdir -p /etc/apt/keyrings
<ol start="3">
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
<ol start="4">
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/null
<ol start="5">
sudo apt update -y
After completing these steps, the system will be able to recognize and access packages from Docker's official repository, including dependency components like docker-ce-cli.
Installing Docker Desktop
Once the Docker repository is configured, you can proceed with installing Docker Desktop. Use the following command to install the downloaded .deb package file:
sudo apt install ./docker-desktop-<version>-<arch>.deb
In practice, replace <version> and <arch> with the specific version number and architecture information. For example, for the docker-desktop-4.8.1-amd64.deb file, the command should be:
sudo apt install ./docker-desktop-4.8.1-amd64.deb
Handling Warning Messages During Installation
During the installation process, you may encounter the following warning message:
Download is performed unsandboxed as root as file docker-desktop-
<version>-<arch>.deb couldn't be accessed by user '_apt'. -
pkgAcquire::Run (13: Permission denied)
This warning indicates that the APT system user _apt cannot access the downloaded .deb file, so the installation proceeds with root privileges in non-sandboxed mode. This is a known permission issue that typically does not affect the installation outcome. Users can safely ignore this warning, as Docker Desktop will still install and function correctly.
Verifying Installation and Next Steps
After installation completes, you can verify Docker Desktop installation success through the following methods:
- Check Docker Desktop service status
- Run
docker --versionto verify Docker CLI availability - Launch the Docker Desktop application interface
It is important to note that Docker Desktop automatically configures itself to use separate storage locations after installation, ensuring isolation from any existing Docker Engine instances on the system. Users can configure Docker Desktop's resource settings, Kubernetes options, and other advanced features as needed.
Best Practices and Considerations
When using Docker Desktop on Linux systems, it is recommended to follow these best practices:
- Repository Configuration First: Always configure Docker's official software repository before attempting to install Docker Desktop
- Version Compatibility: Ensure the downloaded Docker Desktop version is compatible with the Ubuntu system version
- Resource Management: Configure Docker Desktop's memory, CPU, and storage limits appropriately based on system resources
- Update Strategy: Regularly check for and update Docker Desktop to obtain the latest features and security fixes
- Problem Troubleshooting: Refer to Docker's official documentation and community resources for troubleshooting if issues arise
By following the above steps and recommendations, developers can successfully install and use Docker Desktop on Ubuntu systems, fully leveraging its comprehensive development environment while avoiding conflicts with existing Docker Engine installations.