Docker

How to Install Docker on Windows, Mac, and Linux

How to Install Docker on Windows, Mac, and Linux

Most failed Docker installs come down to one mistake made before any command runs: the wrong package for the machine. Desktop and Engine look like the same thing from the outside, and they really aren’t.

Underneath, it’s one tool. Docker packages an application and its dependencies into a portable container, and the Docker Engine daemon runs it. Developers, CI pipelines and production servers all use that same Engine, reached through Docker Desktop on a laptop or the Engine package on a Linux host.

On Ubuntu, the stable channel currently sits at version 29.8.1 in the official apt repository, according to Docker’s own documentation (Docker Docs, 2026).

What Is Docker?

Applications run inside containers that carry their own code, runtime, system libraries and configuration files. Because everything travels together, the same container behaves the same way on a laptop, a test server or a production cluster.

The approach relies on containerization, where containers share the host machine’s kernel instead of emulating an entire operating system for each isolated app.

A virtual machine boots its own kernel and a full OS copy. That makes it heavier, and slower to start, than a container.

Docker isn’t a programming language or a framework, and it doesn’t replace version control. Nor does it emulate a full operating system.

Container usage among IT professionals reached 92% in 2025, up from 80% the year before (Docker, 2025).

That jump explains a lot. Installing Docker used to be a niche DevOps chore, and now it’s a normal step on most developer machines.

Docker Desktop Versus Docker Engine

These are two different install packages, not two versions of one tool.

Why has Docker revolutionized deployment?

Explore Docker statistics: containerization adoption, DevOps transformation, enterprise usage, and how containers changed software delivery.

Discover Docker Insights →

Docker Desktop is a full application with a graphical interface, built for Windows and macOS. It bundles the Engine daemon inside a lightweight virtual machine, so you never see the VM unless you go looking.

Docker Engine is the command line only daemon, meant for Linux servers. It runs directly on the host kernel with no GUI wrapper around it.

Both sit on top of containerd and runc, the low-level runtime components that implement the Open Container Initiative specification for how a container actually starts.

Desktop also ships Docker Compose and BuildKit by default, adds a dashboard for containers, images and volumes, and can switch on a single-node Kubernetes cluster from settings.

For beginners, the appeal is obvious. One installer covers the daemon, the CLI and Compose, and the controls are point and click on both Windows and macOS.

The downsides are real, though. Desktop runs a background VM, so it eats more RAM at idle than you’d expect. It can’t be installed on Linux servers at all (local Linux desktops only). And commercial use at larger companies needs a paid plan: companies with more than 250 employees or $10 million in annual revenue require a paid subscription (Docker, 2026).

Engine skips all of that. It ships under the Apache License 2.0 as part of the open source Moby project, and there’s no revenue threshold attached to its use.

Docker Installation Requirements

On every platform, the machine needs a 64-bit processor with virtualization support enabled. Docker won’t install correctly without it.

Past that baseline, the numbers shift depending on whether the target is Desktop or the Linux-only Engine package.

  • 8GB RAM and WSL version 2.1.5 or later for the Windows WSL 2 backend (Docker, 2026)
  • Windows 10 build 19045 (22H2) or Windows 11 build 22631 (23H2) as the minimum supported build (Docker, 2026)
  • 4GB RAM minimum on macOS, with support limited to the current release plus the two previous major versions (Docker, 2026)
  • No fixed RAM floor for Linux Engine, but a kernel of 3.10 or newer with cgroups and namespaces enabled

On Windows, the WSL 2 backend depends on Second Level Address Translation support in the CPU, checked and enabled from BIOS or UEFI settings.

Apple Silicon Macs run Docker Desktop natively. Rosetta emulation is still recommended for a handful of command line tools that expect an Intel binary.

Disk space is the item most guides understate. Six gigabytes covers the installer and the base virtual machine, but real projects with database volumes and language runtime layers commonly reach into the tens of gigabytes within a few weeks.

Network access matters just as much as local hardware. Every install method needs to reach either Docker Hub or a distribution’s own package repository to pull the required files.

Which Docker Installation Method Should You Choose?

YouTube player

It depends on the operating system, and on whether a graphical interface matters for the job at hand.

MethodPlatformRoot RequiredUpdate Mechanism
Docker DesktopWindows, macOS, Linux desktopOnly for first-time setupBuilt-in auto-updater
apt / dnf / yumUbuntu, Debian, Fedora, RHELYes, via sudoStandard package manager upgrade
Snap packageSnap-enabled Linux distrosYes, for install onlyAutomatic background refresh
Manual binariesAny Linux, air-gapped systemsYesManual, no auto-update

On Linux servers, package manager installs are still the most common route. apt and dnf resolve dependencies for you and pull signed packages straight from Docker’s own repository.

Snap gives up some of that control for convenience. The daemon is sandboxed and updates itself, which suits a desktop better than a production host.

Manual binaries are for air-gapped servers and odd custom setups, anywhere a package manager isn’t available or isn’t trusted.

Pick Engine over Desktop when the target is a headless Linux server, when no graphical interface is available or wanted, or when the workload runs in a CI pipeline instead of on someone’s desktop.

Pick Desktop when the same machine handles day to day development and a visual view of containers, images and volumes saves time.

How To Install Docker On Ubuntu And Debian

Both use apt, so the sequence is nearly identical apart from the repository URL.

  1. Remove old Docker packages first: sudo apt remove $(dpkg --get-selections docker.io docker-compose docker-compose-v2 docker-doc docker-buildx podman-docker containerd runc | cut -f1)
  2. Update the package index and install prerequisites for HTTPS repositories
  3. Add Docker’s official GPG key to the system keyring
  4. Add the Docker apt repository, matching the distribution name (ubuntu or debian)
  5. Update the package index again, then install docker-ce, docker-ce-cli, containerd.io, docker-buildx-plugin, and the Compose plugin
  6. Verify the daemon started: sudo systemctl status docker

The Docker daemon should show as active right after installation, since the apt package enables the systemd service by default.

Docker only supports specific releases of each distribution. Right now that means Debian 13 (Trixie) and Debian 12 (Bookworm), plus the Ubuntu LTS releases listed in the update section below.

Derivatives like Linux Mint aren’t officially supported. The Ubuntu instructions often work on them anyway.

Once the daemon is running, a Docker cheat sheet is worth a skim for the commands you’ll want memorized before writing a first Dockerfile.

How To Install Docker On Fedora And CentOS/RHEL

Fedora and the RHEL family both use dnf or yum, but they pull from separate Docker repositories and follow different release cadences.

Fedora moves fast and ships a newer kernel, and it has used dnf as the default package manager since Fedora 22. CentOS Stream and RHEL have longer support windows. You’ll still see yum on older RHEL 7 hosts, while dnf is standard from RHEL 8 onward.

  1. Remove conflicting packages: sudo dnf remove docker docker-client docker-common docker-latest
  2. Install dnf-plugins-core to manage third-party repositories
  3. Add Docker’s official repository for the matching distribution
  4. Install docker-ce, docker-ce-cli, containerd.io, docker-buildx-plugin, and the Compose plugin
  5. Start and enable the service: sudo systemctl enable --now docker

CentOS and RHEL hosts often sit behind stricter firewall and SELinux policies than a typical Ubuntu box. If a pull from Docker Hub fails, check those two settings first.

That last command does two jobs at once. It starts the daemon immediately and sets it to launch on every reboot.

How To Install Docker On Windows

Docker Desktop on Windows needs the WSL 2 backend enabled before the installer will finish its setup correctly.

WSL 2 is the default choice and what most people should use. After the one-time WSL setup it works without administrator rights. The Hyper-V backend is the alternative, available only with an all-users install. You need it for Windows containers, and it requires administrator privileges to install and update.

  1. Open PowerShell as administrator and run wsl --install, then restart the machine
  2. Download the Docker Desktop installer for Windows from Docker’s site
  3. Run the installer and select Use WSL 2 instead of Hyper-V on the configuration screen
  4. Finish the wizard, then launch Docker Desktop from the Start menu
  5. Accept the Docker Subscription Service Agreement on first launch

Docker Desktop does not start on its own right after installation. It has to be opened manually the first time.

Skipping the WSL update step is the most common reason installs stall midway. The inbox version of WSL on older Windows builds doesn’t meet Docker’s minimum version requirement.

How To Install Docker On macOS

Docker Desktop for macOS ships as a single DMG file, with separate downloads for Apple Silicon and Intel chips.

Picking the wrong architecture is the classic mistake here. An Intel build runs under Rosetta on Apple Silicon, but noticeably slower than the native version.

  1. Download the correct Docker.dmg for the Mac’s chip type
  2. Double-click the file, then drag the Docker icon into the Applications folder
  3. Open Docker.app from Applications to launch it for the first time
  4. Accept the Docker Subscription Service Agreement when prompted
  5. Choose recommended settings, or advanced settings if the CLI tools need a custom path

The first launch can take a minute or two, since macOS runs its usual security checks against a new application before letting it start.

When the whale icon in the menu bar turns solid, the daemon is up.

Installing Docker Desktop On Apple Silicon Macs

On these machines the daemon and its virtual machine run as arm64 processes, so images built for arm64 start with no translation layer in between.

Rosetta 2 is optional for most day to day use. A handful of command line tools still expect an Intel binary and need it installed, which takes one command: softwareupdate --install-rosetta

You can skip Rosetta until one of those Intel-only tools throws a “bad CPU type” error. Installing it fixes that right away.

Docker Licensing And Cost For Personal And Business Use

Crossing the commercial threshold covered earlier doesn’t mean picking a single plan. Docker splits paid access into three subscription tiers on top of the free Personal tier.

TierBuilt ForAdds Over Personal
PersonalIndividuals, students, open source maintainersCore Desktop features, no cost
ProSolo professionals past the free-use thresholdCommercial use rights, Docker Scout basics
TeamSmall to mid-size dev teamsCentralized seat management, shared settings
BusinessLarger organizations with compliance needsSingle sign-on, image access controls, enforced settings

Docker Engine sits outside this whole structure. It carries no seat count and no revenue check, since it ships under the same Apache License 2.0 terms no matter who installs it or how large the company is.

That split matters for planning as much as for budgeting. A company can run Engine on every production server for free and pay for Desktop only on the laptops that need it.

For a broader look at how Docker’s business has grown alongside these licensing changes, the Docker statistics page tracks revenue and usage trends over time.

Configuring Docker To Run Without Root Privileges

A fresh Linux install of Docker Engine needs sudo for every command. That’s by design, not an oversight.

The docker group exists on the system right after installation, but it contains no users by default (Docker Engine docs, 2026). Adding your account to it is what removes the need for sudo:

  • sudo usermod -aG docker $USER
  • Log out and back in, or run newgrp docker, for the change to take effect
  • Confirm it worked with docker run hello-world, with no sudo in front of it

Worth knowing before you do this: membership in the docker group is effectively root access. Anything that can talk to the Docker socket can mount the host filesystem through a container.

Rootless mode is the stricter alternative. It runs the daemon itself under a normal user account, so there’s no privileged socket to protect in the first place.

How To Verify Docker Installed Correctly

Run docker --version first. If the CLI is on the path, it reports a version number. Then run docker run hello-world to pull and start a minimal test container, and on Linux add sudo systemctl status docker to confirm the daemon is active. None of it takes more than a few seconds.

The hello-world command pulls a tiny Docker image from Docker Hub, starts it, prints a confirmation message, and exits on its own.

A successful run means the CLI, the daemon and network access to the registry are all working together.

If that message doesn’t appear, check if Docker is running before touching any configuration file.

A clean install passes every check on the first try, with no manual service restarts in between.

Updating And Uninstalling Docker

Docker Desktop updates itself. The built-in updater checks for new releases and installs them with a restart, no terminal required.

Engine is a plain package manager upgrade, since the packages sit in the same apt or dnf repository used for the original install.

Removing Engine takes a few steps:

  1. Remove the installed packages: sudo apt purge docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-ce-rootless-extras
  2. Delete the leftover data directories: sudo rm -rf /var/lib/docker /var/lib/containerd
  3. Remove the repository source list and the stored GPG key

Step two exists because Docker doesn’t clean up after itself. Images, containers, volumes and networks stay on disk until someone deletes them by hand (Docker Engine docs, 2026).

Docker Engine on Ubuntu is only supported on three LTS releases at any given time, currently 22.04, 24.04, and 26.04 (Docker Engine docs, 2026).

Running an update on an older, unsupported release usually means upgrading the OS itself before the package manager offers a current Docker version.

When Docker Installation Does Not Work

Some conditions block Docker from installing or starting, however carefully the steps above are followed.

  • Virtualization disabled in the BIOS or UEFI, which stops the WSL 2 or Hyper-V backend cold on Windows
  • A macOS or Windows version older than what Docker Desktop currently supports
  • A Linux kernel missing cgroups or namespace support, which is common on stripped-down containers and minimal VM images
  • A corporate proxy or firewall blocking outbound access to Docker Hub

Docker Desktop is not supported on Windows Server editions at all, including Windows Server 2019 and 2022 (Docker Desktop docs, 2026).

Anyone on one of those should look at Docker Engine instead, or at Microsoft’s own tooling for Windows containers on server hardware.

Corporate networks fail more quietly. Anonymous Docker Hub pulls are capped at 100 requests per 6 hours per IP address, and free accounts at 200 (Docker Docs, 2026). A build server pulling images without authentication can start failing partway through a busy day.

None of these are installation bugs. They’re environment mismatches, and each has a known fix once it’s correctly identified.

FAQ on How To Install Docker

What gets installed alongside Docker?

A standard install brings the Docker Engine daemon, the Docker CLI and the Docker Compose plugin together. Desktop packages add BuildKit and an optional Kubernetes cluster. On Linux, package manager installs bundle the same core pieces through separate but linked packages.

What is a Dockerfile and how does it relate to installation?

It has nothing to do with installing Docker itself. A Dockerfile is a text file of build instructions for a container image, and it only matters once the Docker Engine is running and you start building custom images instead of pulling existing ones.

Should you install Docker or an alternative like Podman?

Docker is still the default for most developer workflows and CI pipelines, mostly because of wider tooling support. Podman offers a daemonless, rootless architecture and no licensing threshold. Teams already invested in Compose and Docker Hub usually stay on Docker, unless root privileges are a hard blocker.

What causes permission denied errors after installing Docker?

Almost always, the current user isn’t in the docker group yet. Add the account with usermod, start a new session, and the error goes away without touching any daemon configuration.

Why does the Docker daemon not start after installation?

Disabled virtualization, a conflicting older Docker package, or a systemd service that failed to enable are the usual causes. Checking systemctl status docker and the daemon logs narrows it down faster than reinstalling from scratch.

Does Docker work inside a virtual machine?

Engine runs inside a VM once nested virtualization is enabled on the hypervisor. Docker Desktop inside a VM needs that same nested support, and on VMware ESXi or Azure VMs it is supported only for Docker Business customers, with nested virtualization enabled before the WSL 2 or Hyper-V backend will start correctly.

What Comes Right After You Install Docker?

Docker is ready once docker run hello-world succeeds. Turning that into a working setup takes a bit more, and the order matters. Confirm the daemon is active, add your user to the docker group, then set memory and CPU limits before running anything heavier than a test container.

Skip straight to the limits and you end up chasing permission errors and resource crashes at the same time, which is harder to diagnose than either one alone.

Rootless mode removes the root daemon entirely. The price is slower overlay networking and storage drivers that still lack support.

That trade-off holds against the Docker Engine v29 line Docker documented in 2026, and it only shifts if a future release changes rootless networking.

Once permissions are settled, the next step is learning how to use Docker to build and run containers.

Bogdan Sandu

Stay sharp. Ship better code.

Every week: one curated article, one tool worth knowing, one tip you can use tomorrow. No noise, no padding.