Docker Installation
This guide helps you install Docker on Mac, Linux, and Windows, and also provides a link to try Docker online via Play with Docker.
Docker on Mac
Docker Desktop is the easiest way to install Docker on macOS. It includes both a GUI and CLI tools.
Installation Steps:
- Download Docker Desktop from the official site: Docker Desktop for Mac
- Open the downloaded
.dmgfile and drag Docker to the Applications folder. - Launch Docker from Applications.
- Follow the onboarding instructions to finish the setup.
- Verify installation by opening Terminal and running:
docker --version
docker compose version
docker run hello-world
Optional: Install via Homebrew CLI (Not Recommended):
If you prefer a CLI-only installation:
brew install docker docker-compose
Docker on Linux
For Linux, it is recommended to follow the official installation instructions for your distribution to ensure you get the latest version.
Ubuntu / Debian
Visit the official Docker guide: Docker Desktop for Ubuntu
Fedora / CentOS
Visit the official Docker guide: Docker Desktop for Fedora
After Installation
After installation, you may want to run Docker without sudo:
sudo usermod -aG docker $USER
newgrp docker
Verify installation by opening Terminal and running:
docker --version
docker compose version
docker run hello-world
Docker on Windows
Docker Desktop is available for Windows 10/11 and includes both GUI and CLI tools.
- Download Docker Desktop from: Docker Desktop for Windows
- Run the installer and follow the setup instructions.
- Verify installation in PowerShell or CMD:
docker --version
docker compose version
docker run hello-world
Play with Docker
If you want to try Docker without installing it locally:
- Go to https://labs.play-with-docker.com/
- Create a free account or login with Docker Hub.
- Launch a playground and start experimenting with Docker commands instantly.
References
- Official Docker Documentation
- Docker announcement on Wikipedia
- The Future of Linux Containers - YouTube Video
- Linux Kernel Overview
- What is an Operating System? - Techopedia
- Everything You Need to Know About Linux Containers - Linux Journal
- Cgroups - Wikipedia
- Linux Namespaces - Wikipedia
- Docker Engine Overview
- Linux Kernel - Wikipedia
- LXC Containers - Wikipedia
- Docker Container Runtime
- History of Docker - TechTarget
- Docker Images - TechTarget
- Building Minimal Docker Containers for Go Applications