How to Install Docker on Windows, Mac, and Linux

Summarize this article with:

Containers changed how developers ship software. And it all starts with knowing how to install Docker on your machine.

Docker runs on Windows, macOS, and Linux. The installation takes about 10-15 minutes.

This guide walks you through the complete setup process, from checking system requirements to verifying your first container runs correctly.

You’ll learn how to:

  • Download Docker Desktop for your operating system
  • Configure the Docker daemon and resource settings
  • Troubleshoot common installation errors
  • Verify everything works with terminal commands

No prior container experience needed. Just admin access and 20 minutes.

How to Install Docker

Installing Docker is the process of setting up the containerization platform on your operating system to run isolated applications inside containers.

Developers need this when building microservices, testing applications in isolated environments, or deploying software consistently across machines.

This guide covers 6 steps requiring 10-15 minutes and basic familiarity with the command line interface.

Prerequisites

Verify these requirements before starting the installation process.

Why has Docker revolutionized deployment?

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

Discover Docker Insights →

Operating System Requirements

Windows 10 version 2004 or higher (Build 19041+), Windows 11, macOS 12 Monterey or later, Ubuntu 20.04/22.04/24.04 LTS, Debian 11/12, CentOS 8/9, Fedora 38+, or RHEL 8/9.

Hardware Requirements

  • CPU: 64-bit processor with virtualization support (Intel VT-x or AMD-V)
  • RAM: 4 GB minimum, 8 GB recommended
  • Disk space: 20 GB free storage for Docker Engine and images
  • Network: Internet connection for downloading packages

Access and Permissions

Administrator privileges on Windows, sudo access on Linux, or admin password on macOS.

WSL 2 backend required for Windows installations; Hyper-V must be enabled.

Step One: How Do You Check System Requirements for Docker?

Open your system settings to verify your OS version, available RAM, disk space, and virtualization status before downloading Docker.

Action

Windows: Settings > System > About. Check “Edition” shows Windows 10/11 Pro, Enterprise, or Education. Home edition requires WSL 2.

macOS: Apple menu > About This Mac. Verify macOS 12.0 or newer and Apple Silicon (M1/M2/M3) or Intel processor.

Linux: Run uname -m in terminal. Output should show x86_64 or aarch64.

Verify Virtualization

Windows: Open Task Manager (Ctrl+Shift+Esc) > Performance > CPU. Check “Virtualization: Enabled” appears at bottom.

macOS: Virtualization is enabled by default on all supported Macs.

Linux: Run grep -E '(vmx|svm)' /proc/cpuinfo. Any output confirms virtualization support.

Purpose

Docker Desktop requires hardware virtualization to run containers. Missing requirements cause installation failures or runtime errors.

Step Two: How Do You Download Docker Desktop Installer?

maxresdefault How to Install Docker on Windows, Mac, and Linux

Navigate to the official Docker website, select your operating system, and download the appropriate installer file to your local machine.

Action

Open browser and go to https://www.docker.com/products/docker-desktop/.

Click the download button matching your OS:

  • Windows: Docker Desktop for Windows (Intel/AMD64)
  • macOS Intel: Docker Desktop for Mac (Intel chip)
  • macOS Apple Silicon: Docker Desktop for Mac (Apple chip)
  • Linux: Select your distribution (Ubuntu, Debian, Fedora)

File Details

Windows installer: Docker Desktop Installer.exe (approximately 550 MB).

macOS installer: Docker.dmg (approximately 600 MB).

Linux: DEB or RPM package depending on distribution.

Purpose

The official installer includes Docker Engine, Docker CLI, Docker Compose, and Docker Desktop GUI. Third-party sources may contain outdated or modified versions.

Step Three: How Do You Run the Docker Installation File?

Execute the downloaded installer with administrator privileges, accept the license agreement, and select configuration options for your production environment needs.

Windows Installation

Double-click Docker Desktop Installer.exe.

Select “Use WSL 2 instead of Hyper-V” when prompted (recommended for better performance).

Click OK to proceed. Installation takes 2-5 minutes.

macOS Installation

Double-click Docker.dmg to mount the disk image.

Drag Docker icon to Applications folder.

Open Docker from Applications. Enter admin password when prompted for privileged helper installation.

Linux Installation (Ubuntu/Debian)

Remove old versions first:

sudo apt-get remove docker docker-engine docker.io containerd runc

Install using the repository method:

CommandPurpose
sudo apt-get updateRefreshes your local package index to ensure you have the latest info on available software.
ca-certificatesAllows your system to verify the SSL certificates of the Docker download server.
curl & gnupgTools used to download the security key and manage the encryption used to verify packages.
install -m 0755 -d /etc/apt/keyringsCreates a secure directory (with specific 0755 permissions) to store third-party GPG keys.
**`curl …gpg –dearmor`**
sudo chmod a+r ...Ensures the key file is readable by all users on the system, which is required for the update process to work.

Purpose

Running the installer configures the Docker daemon, sets up networking, and creates necessary system services. WSL 2 backend provides faster file system performance than Hyper-V on Windows.

Step Four: How Do You Configure Docker Settings During Installation?

Select resource allocation, network preferences, and integration options during the setup wizard to match your development workflow.

Action

Windows/macOS: Docker Desktop opens a configuration screen after installation completes.

Settings > Resources > Advanced:

  • CPUs: 2-4 cores (half your total)
  • Memory: 4-8 GB
  • Disk image size: 60 GB minimum

Linux: Edit /etc/docker/daemon.json to configure storage driver and logging options.

Purpose

Default settings may throttle container performance or consume excessive host resources. Proper configuration management prevents memory exhaustion during multi-container workloads.

Step Five: How Do You Start Docker After Installation?

Launch the Docker Desktop application or start the Docker daemon service to begin running containers on your system.

Action

Windows: Search “Docker Desktop” in Start menu, click to launch. Whale icon appears in system tray when running.

macOS: Open Applications > Docker. Grant permissions for networking and file sharing when prompted.

Linux: Start the daemon with sudo systemctl start docker.

Enable auto-start: sudo systemctl enable docker.

Add User to Docker Group (Linux)

Run sudo usermod -aG docker $USER to execute Docker commands without sudo.

Log out and back in for group changes to apply.

Purpose

The Docker daemon must be running before any container operations. Learn more about how to start the Docker daemon for advanced startup options.

Step Six: How Do You Verify Docker Is Running Correctly?

Execute test commands in your terminal to confirm Docker Engine installed properly and can pull images from Docker Hub.

Action

Open Terminal (macOS/Linux) or PowerShell (Windows).

Check Docker version:

docker –version

Expected output: Docker version 24.0.x, build xxxxxxx

Run the hello-world test container:

docker run hello-world

Expected output: “Hello from Docker! This message shows that your installation appears to be working correctly.”

Purpose

The hello-world image downloads from Docker Hub, runs a simple container, and exits. Success confirms networking, image pulling, and container execution all function properly.

Verification

Run these commands to confirm full installation success:

  • docker info - displays system-wide Docker configuration
  • docker compose version - confirms Compose plugin installed
  • docker ps - lists running containers (empty if none active)

Check the Docker Desktop dashboard shows green “Engine running” status.

Need to confirm the daemon is active? See how to check if Docker is running for additional verification methods.

Troubleshooting

What If Docker Fails to Start?

Issue: Docker Desktop stuck on “Starting” or daemon won’t launch.

Solution (Windows): Open PowerShell as Admin, run wsl –update then wsl –shutdown. Restart Docker Desktop.

Solution (macOS): Delete ~/Library/Group Containers/group.com.docker/ and reinstall.

Solution (Linux): Check logs with sudo journalctl -u docker.service.

What If Virtualization Is Not Enabled?

Issue: Error message “Hardware assisted virtualization and data execution protection must be enabled.”

Solution: Restart computer, enter BIOS/UEFI (F2, F12, or Del key during boot), enable Intel VT-x or AMD-V under CPU settings. Save and exit.

Docker requires hardware virtualization; it cannot run in software emulation mode. This differs from a virtual machine that may support nested virtualization.

What If Permission Errors Occur on Linux?

Issue: “Got permission denied while trying to connect to the Docker daemon socket.”

Solution: Add user to docker group: sudo usermod -aG docker $USER.

Then run newgrp docker or log out completely and log back in.

Alternative Installation Methods

Command Line Installation on Ubuntu

Complete installation using apt package manager:

` sudo apt-get update sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin `

This installs Docker CE (Community Edition) with all components. Ideal for servers without GUI or automated DevOps provisioning.

Command Line Installation on macOS with Homebrew

Run brew install –cask docker in Terminal.

Launch Docker from Applications after installation completes.

Homebrew method auto-updates Docker with brew upgrade. Useful for developers already using brew for source control management tools.

Related Processes

After completing the Docker installation, continue with these tasks:

Docker integrates with continuous integration pipelines and build pipelines for automated testing and deployment workflows.

Compare orchestration options in Kubernetes vs Docker when scaling to production clusters.

FAQ on How To Install Docker

Is Docker free to install?

Docker Desktop is free for personal use, education, and small businesses with fewer than 250 employees. Larger organizations require a paid subscription. Docker Engine on Linux remains free and open-source for all users regardless of company size.

Can I install Docker on Windows 10 Home?

Yes. Windows 10 Home supports Docker Desktop using the WSL 2 backend. You need Windows 10 version 2004 or higher with the Windows Subsystem for Linux installed. Hyper-V is not required for Home edition installations.

How much disk space does Docker need?

Docker Desktop requires approximately 2 GB for the base installation. Plan for 20-50 GB total since Docker volumes and images accumulate over time. Storage needs increase based on how many containers you run.

What is the difference between Docker Desktop and Docker Engine?

Docker Engine is the core runtime that runs containers. Docker Desktop bundles the Engine with a GUI, Docker Compose, and Kubernetes support for Windows and macOS. Linux users can install either option depending on their needs.

Do I need to enable virtualization to install Docker?

Yes. Docker requires hardware virtualization (Intel VT-x or AMD-V) enabled in your BIOS settings. Without it, the Docker daemon cannot create isolated container environments. Check Task Manager on Windows to verify virtualization status.

Can I run Docker without admin privileges?

Docker Desktop installation requires administrator access. After installation, Linux users can run containers without sudo by adding their account to the docker group. Windows and macOS users need elevated permissions for daemon operations.

How do I update Docker after installation?

Docker Desktop checks for updates automatically and prompts you to install them. Click the whale icon in your system tray, then select “Check for Updates.” Linux users update through their package manager with apt or yum commands.

Why does Docker installation fail on my computer?

Common causes include disabled virtualization, insufficient RAM, outdated OS versions, or conflicting software like VirtualBox. Check system requirements first. Review installation logs for specific error messages pointing to the root cause.

Can I install Docker alongside other virtualization software?

Docker coexists with most virtualization tools. Some older VirtualBox versions conflict with Hyper-V on Windows. Use WSL 2 backend to avoid conflicts. VMware and Parallels typically run alongside Docker without issues on their respective platforms.

How do I completely uninstall Docker?

On Windows, use Settings > Apps to remove Docker Desktop. On macOS, drag Docker to Trash and delete ~/Library/Group Containers/group.com.docker/. Linux users run sudo apt-get purge docker-ce and remove remaining Docker images manually.

Conclusion

You now know how to install Docker on Windows, macOS, and Linux systems.

The process covers downloading Docker Desktop, configuring virtualization settings, and running your first container with the hello-world image.

Docker transforms how teams handle app deployment and testing workflows. Containers provide consistent environments from local development to production servers.

Start experimenting with the Docker CLI commands you learned. Pull images from Docker Hub. Build custom containers for your projects.

Run into issues? Check the troubleshooting section or review the Docker daemon logs for specific error messages.

The containerization skills you build now transfer directly to orchestration tools, continuous deployment pipelines, and microservices architecture patterns.

50218a090dd169a5399b03ee399b27df17d94bb940d98ae3f8daff6c978743c5?s=250&d=mm&r=g How to Install Docker on Windows, Mac, and Linux
Related Posts