Docker Desktop on Windows, macOS and Linux
You learned that containers share the host's Linux kernel. Most laptops run Windows or macOS, which have no Linux kernel. So how do millions of developers run Linux containers on them every day? The answer is Docker Desktop, and knowing what it does behind the curtain explains many of its quirks.
The rule
Docker Desktop brings a hidden Linux VM to your laptop.
Docker Desktop is one installer that gives you:
- the
dockerCLI you type commands into; - the Docker Engine (the daemon that does the real work);
- Docker Compose and Buildx for multi-container apps and builds;
- a dashboard window for browsing images, containers and volumes.
The Engine needs a Linux kernel, so Desktop runs a small, managed Linux virtual machine and places the Engine inside it. On Windows it normally uses WSL 2 (the Windows Subsystem for Linux) as that VM. On macOS it uses Apple's virtualisation framework. On Linux, Desktop also uses a VM, for consistency with other platforms, even though the kernel is already there.
The CLI stays on your laptop and talks to the Engine inside the VM. Two commands prove the whole chain works:
docker version
docker run hello-worlddocker version prints a Client section (the CLI) and a Server section (the Engine). hello-world pulls a tiny image, starts a container that prints a greeting, and exits.
Licensing is worth checking once: Docker Desktop is free for personal use, education, open-source work and small businesses, but larger companies need a paid subscription. Read the current terms before using it at work.
The shortcut
Two halves: client and server. Whenever Docker misbehaves on a laptop, ask which half is failing. docker version answers it at once.
Run docker version
The Client section prints, but the Server part ends with an error about not connecting to the daemon.
A related trap: files and ports cross a VM boundary on Mac and Windows. Sharing large folders into containers can be slower than on native Linux, and that is normal, not a fault in your setup.
Drills
Answer fast — trust the rule.
How does Docker Desktop run Linux containers on macOS?
On Windows, what does Docker Desktop normally use as its Linux backend?
docker version prints a Client section and then an error instead of a Server section. What is the likely cause?
Which command is the classic first test that pulling and running an image works end to end?
Remember
- Docker Desktop brings a hidden Linux VM to your laptop, plus the CLI, Compose and a dashboard.
- Shortcut: two halves, client and server;
docker versionshows which half is failing. - Trap: on Mac and Windows, files and ports cross a VM boundary, so some things are slower than on native Linux.
