Sub topic 3
Checking system requirements
This chapter assumes you can use a terminal, know your operating system (OS) and version, and have administrator rights on the machine. You should also know the basic difference between Docker Desktop and Docker Engine from the previous chapter. Here you check whether your machine can run the installation you chose, before you install anything.
Why check first
Most failed Docker installs come from a machine that never met the requirements. Common causes are an unsupported OS release, virtualization turned off in firmware, or a 32-bit system. Checking takes a few minutes. Undoing a half-finished install takes longer.
Docker Desktop and Docker Engine have different requirements. Docker Engine runs the daemon directly on a Linux kernel. Docker Desktop runs the daemon inside a lightweight virtual machine (VM), so it also needs hardware virtualization.
Requirements for Docker Engine on Ubuntu
Docker Engine needs three things:
- A 64-bit system. Docker publishes packages for
amd64(x86_64),arm64,armhf,s390x, andppc64le. - A supported Ubuntu release. Docker supports current Ubuntu LTS releases and a few recent non-LTS ones. Releases that Ubuntu no longer supports are not covered.
- No conflicting packages. Ubuntu's own
docker.iopackage and similar ones can clash with Docker's packages, so remove them first.
Engine does not need hardware virtualization, because containers share the host kernel.
Requirements for Docker Desktop
The details change with each release, so confirm them against Docker's documentation for your platform. The general pattern is stable:
| Platform | What to check |
|---|---|
| macOS | A current or recent macOS release, Apple silicon or Intel, and at least 4 GB RAM |
| Windows | A supported Windows 10 or 11 build, the WSL 2 backend or Hyper-V, virtualization enabled in firmware, and at least 4 GB RAM |
| Linux | A 64-bit distribution that Docker supports, KVM virtualization, systemd, a desktop environment, and at least 4 GB RAM |
On Windows, Docker Desktop normally uses the Windows Subsystem for Linux 2 (WSL 2) backend. You can run wsl --status in PowerShell to see whether WSL is installed and which version is the default.
Running the checks on Linux
This script reports the facts that matter for both installations on Ubuntu. It only reads system state and changes nothing.
#!/usr/bin/env bash
echo "== OS release =="
grep -E '^(PRETTY_NAME|VERSION_CODENAME)=' /etc/os-release
echo "== Architecture (want x86_64 or aarch64) =="
uname -m
echo "== Memory =="
free -h | head -n 2
echo "== Init system (want systemd) =="
ps -p 1 -o comm=
echo "== CPU virtualization flags (Desktop only; 0 means none found) =="
grep -c -E 'vmx|svm' /proc/cpuinfo
echo "== KVM device (Desktop only) =="
ls -l /dev/kvm 2>/dev/null || echo "/dev/kvm not present"
echo "== Conflicting packages =="
dpkg -l | grep -E 'docker|containerd|runc' || echo "none found"uname -m prints x86_64 on 64-bit Intel and AMD machines and aarch64 on 64-bit ARM. A 0 from the grep -c line means the CPU does not advertise virtualization, or a virtual machine hides the feature from the guest. If you run Ubuntu inside another VM, the host must enable nested virtualization before Docker Desktop can work.
A missing /dev/kvm on a machine whose CPU supports virtualization usually means the feature is disabled in the BIOS or UEFI settings, or the KVM kernel modules are not loaded.
Checking macOS and Windows
On macOS, sw_vers -productVersion prints your OS version and uname -m prints arm64 or x86_64. Choose the installer that matches the architecture, because the two builds are separate downloads.
On Windows, run systeminfo in PowerShell. It reports the OS version and build. It also shows a Hyper-V Requirements section that tells you whether virtualization is enabled in firmware.
What to do with the results
If every check passes, continue with your installation. If virtualization is off, enable it in firmware and reboot. If your OS release is too old, upgrade it, or choose Docker Engine on a supported host. If you are on a 32-bit system, Docker is not an option on that machine.
Exercise
You run the check script on an Ubuntu virtual machine. It prints x86_64 and systemd, but the virtualization count is 0 and /dev/kvm is missing. Can you install Docker Engine from the apt repository? Can you install Docker Desktop?
Show answer
Docker Engine can be installed, because it needs only a 64-bit system and a supported Ubuntu release, not hardware virtualization. Docker Desktop cannot run yet, because it needs KVM. You would have to enable nested virtualization on the VM host first.