macOS
π§° Step 1: Install Docker Desktopβ
π₯οΈ Works on:
- macOS 11 (Big Sur) and newer
- Apple Intel or Apple Silicon (M1/M2) chips
πΉ 1. Download Docker Desktopβ
- Official link: https://www.docker.com/products/docker-desktop
Choose the correct version:
- Intel Chip β "Mac with Intel chip"
- Apple Silicon (M1/M2) β "Mac with Apple chip"
You can check your chip via: ο£Ώ > About This Mac
πΉ 2. Installβ
- Open the downloaded
.dmgfile - Drag Docker into the Applications folder
- Launch Docker Desktop from Applications
- Follow any setup prompts and allow required system permissions
π Step 2: Verify Docker Is Workingβ
After Docker Desktop starts (you'll see the π³ icon in the macOS menu bar):
Open your Terminal and run:
docker --version
docker info
docker run hello-world
You should see:
Hello from Docker!
π€ Optional: Add Docker CLI to PATHβ
Docker Desktop sets up Docker CLI automatically. If not, check:
echo $PATH
which docker
If it's not working, you may need to add /usr/local/bin or /opt/homebrew/bin to your $PATH.
π§ͺ (Optional) Install Docker using Homebrew (CLI tools only)β
If you prefer just Docker CLI and no GUI:
brew install docker docker-compose
β οΈ This does not install the Docker Engine, which is needed to run containers.
You still need Docker Desktop unless youβre connecting to a remote Docker daemon or using a VM.
π§ Docker Desktop Features on macOSβ
| Feature | Available |
|---|---|
| Docker CLI & GUI Dashboard | β |
| Docker Compose | β |
| Kubernetes (optional) | β |
| Virtualization via HyperKit/AVF | β |
| GPU Support | β Not yet |
| Port Forwarding to localhost | β |
| File Sharing with host (volumes) | β |
β Summaryβ
| Step | Description |
|---|---|
| 1οΈβ£ | Download Docker Desktop from docker.com |
| 2οΈβ£ | Install & launch Docker |
| 3οΈβ£ | Run docker run hello-world to verify |
| 4οΈβ£ | Use Docker from Terminal (docker ps, etc.) |
Running GUI apps from Docker on macOS is possible, but it requires extra setup because:
- Docker containers run in a Linux virtual machine (not directly on macOS).
- macOS does not support native X11 or Wayland inside Docker.
- You must forward the graphical display output to an X server running on macOS.