Installation
This page covers installing Docker so you can build and run containers. You can use Docker Engine (CLI + daemon) or Docker Desktop (adds a GUI and simpler setup on Mac/Windows).
Install Docker Engine using your distro’s package manager. Example for Ubuntu/Debian:
# Add Docker's official GPG key and reposudo apt-get updatesudo apt-get install ca-certificates curlsudo install -m 0755 -d /etc/apt/keyringssudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.ascsudo chmod a+r /etc/apt/keyrings/docker.ascecho "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
# Install Docker Enginesudo apt-get updatesudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-pluginStart and enable the daemon:
sudo systemctl start dockersudo systemctl enable dockerAdd your user to the docker group so you can run docker without sudo:
sudo usermod -aG docker $USER# Log out and back in for the group to take effect- Option A — Docker Desktop: Download from docker.com/products/docker-desktop. Includes Docker Engine, CLI, Compose, and a GUI. Easiest for most users.
- Option B — Colima + CLI: Install Docker CLI and use Colima to run the daemon in a lightweight VM:
brew install docker colimathencolima start.
Windows
Section titled “Windows”- Recommended: Install WSL2 (Windows Subsystem for Linux), then install Docker Engine inside your WSL2 distro (same as Linux above). Alternatively, install Docker Desktop for Windows and enable the WSL2 backend so containers run inside WSL2.
Verify Installation
Section titled “Verify Installation”Run the official hello-world image:
docker run hello-worldYou should see a message that Docker is working. Then try:
docker versiondocker infoKey Takeaways
Section titled “Key Takeaways”- On Linux, install Docker Engine and the Compose plugin via the official Docker repo; add your user to the
dockergroup. - On macOS and Windows, Docker Desktop is the simplest option; on Windows use the WSL2 backend.
- Confirm with
docker run hello-worldanddocker version.