Installing Docker
Install Docker on Windows, macOS, and Linux.
Installing Docker
This guide covers installing Docker on Windows, macOS, and Linux.
Verify System Requirements
Docker supports:
- Windows 10 and Windows 11
- macOS
- Most Linux distributions
Installing Docker on Windows
- Download Docker Desktop.
- Run the installer.
- Enable WSL2 integration if prompted.
- Restart your computer.
Verify the installation:
docker --version
Example output:
Docker version 27.x.x
Installing Docker on macOS
- Download Docker Desktop.
- Open the installer package.
- Drag Docker into the Applications folder.
- Launch Docker Desktop.
Verify the installation:
docker --version
Installing Docker on Ubuntu
Update package repositories:
sudo apt update
Install Docker:
sudo apt install docker.io -y
Start Docker:
sudo systemctl start docker
Enable Docker on boot:
sudo systemctl enable docker
Verify installation:
docker --version
Running Your First Container
Test your installation:
docker run hello-world
Docker will download the image and display a welcome message if everything is working correctly.
Common Issues
Permission Denied
Add your user to the Docker group:
sudo usermod -aG docker $USER
Log out and back in afterward.
Docker Service Not Running
Start the Docker daemon:
sudo systemctl start docker
Summary
Once Docker is installed and verified, you're ready to build images and run containers.