Sub topic 5
Installing Docker Desktop
This chapter assumes you have read the earlier chapters on Docker's components and on choosing between Desktop and Engine. It also assumes you have checked your system requirements and licensing. You should be comfortable in a terminal and have administrator rights on your machine.
What the installer sets up
Docker Desktop is one application that bundles the Docker Engine, the docker CLI, Compose, Buildx, and a graphical dashboard. On macOS and Windows, and also on Linux, the Engine runs inside a lightweight virtual machine (VM) that Desktop manages for you. Your docker commands talk to the daemon in that VM.
Because of this layout, the installer mostly does two jobs. It sets up virtualization support, and it places the CLI tools on your path.
Installing on macOS
- Download the correct disk image from the official Docker site. Choose Apple silicon or Intel to match your Mac.
- Open
Docker.dmgand drag Docker into the Applications folder. - Start Docker from Applications and accept the license terms.
- Wait for the whale icon in the menu bar to show that Docker is running.
You can also install from the terminal, which is useful for scripted setups:
sudo hdiutil attach Docker.dmg
sudo /Volumes/Docker/Docker.app/Contents/MacOS/install --accept-license
sudo hdiutil detach /Volumes/DockerInstalling on Windows
Windows needs a backend to run the Linux VM. WSL 2 (Windows Subsystem for Linux) is the default and usually the better choice. Hyper-V is the alternative on editions that support it.
- Download
Docker Desktop Installer.exe. - Run it and keep the WSL 2 option selected unless you have a reason to use Hyper-V.
- Restart when the installer asks.
- Start Docker Desktop and accept the license terms.
For an unattended install, run this from an elevated PowerShell prompt in the folder with the installer:
Start-Process 'Docker Desktop Installer.exe' -Wait 'install --accept-license'If you installed with one administrator account but use Docker from another, add your user to the docker-users local group. Then sign out and back in.
Installing on Linux
Docker Desktop for Linux runs in its own VM, so it needs KVM (the Linux kernel's hardware virtualization). Check that KVM is loaded before you install:
lsmod | grep kvmIf the command prints nothing, enable virtualization in your BIOS or UEFI settings. You may also need to load the module for your CPU vendor.
Download the .deb package for your architecture from the official site. On Ubuntu or Debian, install it with apt so that dependencies resolve. Then start Desktop as a user service:
sudo apt-get update
sudo apt-get install ./docker-desktop-amd64.deb
systemctl --user start docker-desktopTo make Desktop start at login, run systemctl --user enable docker-desktop.
First launch
On first launch, Docker Desktop asks you to accept the Docker Subscription Service Agreement. It may offer to sign you in. Signing in is optional for basic use, but it can matter for pull rate limits and for organization policies. If you skipped the licensing chapter, read it before using Desktop at work.
Check these settings after the first start:
- Resources: Desktop gives the VM a share of your CPU and memory. Raise it if builds are slow, but leave enough for your host.
- Start at login: Turn this off if you want to start Docker only when you need it.
- WSL integration (Windows): Enable your Linux distributions under Settings, Resources, WSL integration, so
dockerworks inside them.
Quick check
Open a terminal and confirm that the CLI can reach the daemon:
docker versionYou should see both a Client section and a Server section. If only the client appears, Desktop is still starting or is not running. The next chapters cover full verification and troubleshooting.
Common installation mistakes
| Symptom | Likely cause | Fix | Column |
|---|---|---|---|
| Desktop will not start on Windows | WSL 2 or virtualization is off | Enable virtualization in firmware and install WSL 2 | |
| Desktop will not start on Linux | KVM is unavailable | Enable virtualization and check `lsmod \ | grep kvm` |
| `docker` not found | Terminal opened before install finished | Open a new terminal or sign out and back in | |
| Permission denied on Windows | User not in `docker-users` | Add the user to the group and sign in again |
Exercise
You installed Docker Desktop on Ubuntu. A teammate says the images you pulled earlier with a native Docker Engine are missing. Why, and how can you confirm which daemon you are using?
Show answer
Docker Desktop on Linux runs its own daemon inside a VM. It does not share images or containers with a native Engine on the host. Run docker context ls to see which context is active, such as desktop-linux or default, and switch with docker context use. The images still exist in the Engine's storage.