๐ณ How to Install Docker on Windows, Linux, and Mac


Step-by-step guide to get Docker running on your system in just a few minutes.
๐ง What You'll Learn
In this guide, weโll walk through how to install Docker on:
โ Windows 10/11
โ Linux (Ubuntu)
โ macOS (Intel or Apple Silicon)
Whether youโre building apps, learning DevOps, or exploring containers, this setup is your first step into Docker.
๐ป What is Docker Again?
Docker is a platform that lets you package apps into containers โ lightweight, portable environments that run the same anywhere.
To run Docker, you need to install Docker Desktop or the Docker Engine based on your OS.
๐ช Installing Docker on Windows 10/11
โ Prerequisites:
Windows 10 or 11 (64-bit, Pro/Enterprise or WSL2 support on Home)
WSL2 backend enabled (for Windows Home)
๐ Steps:
Download Docker Desktop
๐ Get it from hereRun the Installer
Follow the installation wizard. Check the option to use W**SL2 backend**.Restart your PC (if prompted)
Verify Installation
Open Command Prompt or PowerShell and type:docker --version
5. Run a Test Container
docker run hello-world
โ Youโre good to go! ๐
๐ง Installing Docker on Linux (Ubuntu Example)
โ Prerequisites:
Ubuntu 20.04+ or similar Debian-based distro
sudo
access
๐ Steps:
Update packages
sudo apt update && sudo apt upgrade
Install required packages
sudo apt install ca-certificates curl gnupg lsb-release
Add Dockerโs GPG key
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker.gpg
Set up the Docker repo
sudo apt update sudo apt install docker-ce docker-ce-cli containerd.io
Install Docker Engine
sudo apt update sudo apt install docker-ce docker-ce-cli containerd.io
Verify Installation
docker --version docker run hello-world
๐ Docker is now running on your Linux box!
๐ Installing Docker on macOS (Intel & M1/M2)
โ Prerequisites:
macOS 11+ (Big Sur or newer)
Intel or Apple Silicon (M1/M2 chip)
๐ Steps:
Download Docker Desktop for Mac
๐ Download HereInstall the app
- Drag
Docker.app
into your Applications folder
- Drag
Run Docker Desktop
- On first launch, give it necessary permissions
Verify Installation Open Terminal and type:
docker --version docker run hello-world
โจ You're now ready to containerize on macOS!
๐ง Pro Tip: Use Docker Compose
Once Docker is set up, try Docker Compose to manage multi-container apps:
docker compose version
If not installed, it usually comes bundled with Docker Desktop.
๐ Final Thoughts
Installing Docker is your first step toward mastering modern development, automation, and deployment.
In upcoming posts, weโll show how to:
Create your first Dockerfile
Build and run a custom app in Docker
Share containers with others
Subscribe to my newsletter
Read articles from Ajaikrishna S directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
