Sub topic 2
Docker Desktop or Docker Engine: choosing one
This chapter assumes you know what the daemon, CLI, and plugins are from the previous chapter. It also assumes you can use a terminal and have administrator rights on your machine. By the end, you should be able to pick the right installation for your operating system and situation.
What each product contains
Docker Engine is the core: the dockerd daemon, the docker CLI, and the containerd runtime. The Buildx and Compose plugins are separate packages that you install alongside it. Engine is open source. It runs natively on Linux because containers use Linux kernel features.
Docker Desktop is an application that bundles Engine with extra pieces:
- A graphical dashboard for containers, images, and volumes.
- The CLI, Compose, and Buildx, already installed and version-matched.
- A Linux virtual machine (VM) that hosts the daemon.
- Optional features such as a single-node Kubernetes cluster, an extensions marketplace, and integrated update management.
The VM is the important difference. macOS and Windows cannot run Linux containers directly, so Docker Desktop starts a small Linux VM and runs the daemon inside it. Your docker command talks to that daemon, and Desktop forwards ports and file mounts between the VM and your host. Docker Desktop on Linux also uses a VM, even though Linux could run containers natively. The VM keeps the experience identical across platforms and isolates Desktop from your host's own Engine.
Comparing the two
| Aspect | Docker Desktop | Docker Engine |
|---|---|---|
| Platforms | macOS, Windows, Linux | Linux (including servers) |
| Where the daemon runs | Inside a VM | Directly on the host |
| Interface | GUI plus CLI | CLI only |
| Compose and Buildx | Included | Installed as plugins |
| Resource cost | Higher, because the VM reserves memory and CPU | Lower |
| Licensing | Free for personal use, education, small businesses, and open source. Paid subscription for larger organizations | Open source, no subscription |
| Typical use | Developer workstations | Servers, CI runners, headless machines |
How to decide
Start with your operating system, because it narrows the choice quickly.
- macOS or Windows: Docker Desktop is the supported route. Engine does not run natively on these systems, and the alternatives are other VM-based setups you would assemble yourself.
- Linux server or CI machine: Install Docker Engine. A VM adds overhead and a GUI is useless on a headless host.
- Linux desktop: Either works. Choose Engine if you want the lightest setup and direct access to the host's resources. Choose Desktop if you want the dashboard and the same environment as teammates on other platforms.
Licensing can also decide the question. Docker Desktop requires a paid subscription for companies above a size threshold, based on employee count and revenue. The licensing chapter covers the exact terms. If your employer is large, check the policy before installing Desktop on a work machine. Engine is not subject to this.
Seeing the difference in practice
You can check which daemon your CLI talks to with Docker contexts. A context is a named connection setting for a daemon.
docker context lsOn a machine with Docker Desktop, the list includes a desktop-linux context, or default on older versions. On Linux with Engine only, you see default, which points at unix:///var/run/docker.sock. If you install both on one Linux machine, they run as two separate daemons with separate images and containers. The active context decides which one answers.
Common mistakes
- Choosing Desktop for a server. The VM wastes memory and the GUI cannot be used remotely.
- Expecting host-level performance on macOS or Windows. Bind mounts cross the VM boundary and can be slower than on native Linux.
- Ignoring licensing until later. Decide before you roll Desktop out across a team.
- Installing both and forgetting. See the warning above.
Exercise
A teammate on Windows and you on an Ubuntu server both need Docker. Which product does each person install, and why do the two daemons run in different places?
Show answer
The Windows teammate installs Docker Desktop. The Ubuntu server gets Docker Engine. Windows cannot run Linux containers natively, so Desktop runs the daemon inside a Linux VM. Ubuntu has a Linux kernel already, so Engine runs the daemon directly on the host.
Exercise
You run docker context ls on a Linux laptop and see both default and desktop-linux. What does this tell you, and why might docker images show different results under each?
Show answer
Both Docker Engine and Docker Desktop are installed. Each context points to a different daemon, and each daemon keeps its own images, containers, and volumes. Switching contexts switches which daemon answers your commands.