Now that you know what Docker is, the next step is to install it on your computer. The installation process depends on your operating system, but don’t worry — I’ll walk you through step by step.
🐧 Install Docker on Linux
Docker is supported on most Linux distributions (Ubuntu, Debian, CentOS, Fedora, etc.). Here’s the process for Ubuntu/Debian, which is the most common:
Step 1: Update your system
sudo apt update
sudo apt upgrade -y
Step 2: Install required packages
sudo apt install ca-certificates curl gnupg lsb-release -y
Step 3: Add Docker’s official GPG key
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker.gpg
Step 4: Set up the stable repository
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
Step 5: Install Docker Engine
sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io -y
Step 6: Verify installation
docker --version
👉 If you see the version, Docker is installed successfully!
🍎 Install Docker on Mac
On macOS, Docker is installed using Docker Desktop.
Steps:
- Go to Docker Desktop for Mac.
- Download the
.dmgfile (choose Intel or Apple Silicon version). - Open the file and drag Docker to your Applications folder.
- Launch Docker Desktop (you’ll see the whale icon in the menu bar).
- Verify installation:
docker --version
🖥 Install Docker on Windows
On Windows, you’ll also use Docker Desktop.
Steps:
- Go to Docker Desktop for Windows.
- Download and run the installer (
.exe). - During setup, enable WSL 2 (Windows Subsystem for Linux) if prompted.
- Restart your computer.
- Open Docker Desktop (whale icon in the taskbar).
- Verify installation:
docker --version
✅ Common Post-Installation Step
By default, you might need sudo (Linux) or admin rights (Mac/Windows) to run Docker. To avoid that on Linux:
sudo usermod -aG docker $USER
newgrp docker
Now you can run:
docker run hello-world
This will download a test image and confirm your Docker setup is working correctly.
🎯 Final Thoughts
Installing Docker might feel a bit different depending on your system, but once it’s done, you’re ready to build and run containers anywhere.
👉 In the next guide, we’ll cover: Running Your First Docker Container.
💡 Pro Tip: If you get stuck during installation, check the official Docker documentation or feel free to reach out — I also provide Docker training and setup consulting to help you get started quickly.

