Setting Up Docker Desktop on Your Mac
Install Docker Desktop on macOS, run your first containers, and learn how images differ from containers — with the right setup for Apple Silicon and Intel Macs.
What you'll build / learn
By the end of this tutorial you'll have Docker Desktop installed and running on macOS, you'll have launched your first container (hello-world, then a live Nginx web server), and you'll understand the difference between an image and a container plus how to tune Docker's CPU and memory on Apple Silicon vs Intel Macs.
Prerequisites
- A Mac running macOS 13 (Ventura) or later (Docker Desktop's currently supported minimum).
- Knowing your chip type. Click the Apple menu → About This Mac:
- Apple Silicon (M1/M2/M3/M4) shows a "Chip" line like Apple M2.
- Intel shows a "Processor" line like Intel Core i5.
- At least 4 GB of RAM free and a few GB of disk space.
- Administrator rights (you'll be asked for your password during install).
- (Optional) Homebrew if you prefer installing from the terminal.
Docker Desktop is free for personal use, education, and small businesses. Larger organizations need a paid subscription — check the current Docker terms before using it at work.
Step 1 — Download or install Docker Desktop
You have two options. Pick one.
Option A: Direct download (simplest for beginners)
- Go to https://www.docker.com/products/docker-desktop/.
- Click the download button for your chip: "Download for Mac – Apple Silicon" or "Download for Mac – Intel Chip". Choosing the wrong one will fail to install, so double-check the chip-type check in Prerequisites.
- Open the downloaded
Docker.dmg. - Drag the Docker icon into the Applications folder.
- Eject the disk image.
Option B: Homebrew (one command)
brew install --cask docker-desktop
Homebrew automatically downloads the build that matches your architecture. The cask was renamed to docker-desktop (the old docker cask is deprecated/redirected), which is also what Docker's own docs now recommend. If you want to confirm you're getting the right one, check it first:
brew info --cask docker-desktop
Step 2 — Launch Docker Desktop
- Open Applications and double-click Docker (or press ⌘+Space, type
Docker, hit Return). - The first launch asks you to accept the service agreement and may request your password to install a helper component.
- You can skip the sign-in prompt — an account isn't required to use Docker locally.
- Wait for the whale icon 🐳 in the menu bar (top-right) to stop animating. When it's steady and says "Docker Desktop is running", the daemon is up.
The daemon (dockerd) is the background service that actually builds and runs containers. The docker command-line tool talks to it. Docker Desktop must be running for any docker command to work.
Step 3 — Verify the installation
Open Terminal (Applications → Utilities → Terminal) and run:
docker version
You should see both a Client and a Server section. If the Server section is present, the daemon is reachable. Then check system info:
docker info
Look for lines like Server Version: and your Architecture: (aarch64 on Apple Silicon, x86_64 on Intel).
Step 4 — Run your first container
docker run hello-world
Docker will print Unable to find image 'hello-world:latest' locally, pull it from Docker Hub, then run it. You'll see a friendly message starting with "Hello from Docker!". That confirms the full pipeline works: pull image → create container → run it.
Step 5 — Understand images vs containers
This is the core mental model:
| Concept | What it is | Analogy |
|---|---|---|
| Image | A read-only template (app + dependencies + filesystem). | A recipe or a class definition |
| Container | A running (or stopped) instance created from an image. | A cooked dish, or an object instance |
One image can spawn many containers. List what you have:
docker images # downloaded images
docker ps # running containers
docker ps -a # all containers, including stopped ones
Step 6 — Run a real web server
Let's run Nginx and map it to a port on your Mac:
docker run --name myweb -d -p 8080:80 nginx
What the flags mean:
--name myweb— give the container a friendly name.-d— detached (runs in the background).-p 8080:80— forward your Mac's port 8080 to the container's port 80.
Open http://localhost:8080 in your browser — you'll see the "Welcome to nginx!" page.
Clean up when done:
docker stop myweb # stop the container
docker rm myweb # delete it
docker rmi nginx # (optional) remove the image
Step 7 — Manage resources (Apple Silicon vs Intel)
Click the whale icon → Settings (the gear) → Resources. Here you can cap CPUs, Memory, Swap, and Disk image size. Defaults are usually fine; raise memory if you run heavy stacks like databases.
Key architecture differences:
| Topic | Apple Silicon (ARM64) | Intel (x86_64) |
|---|---|---|
| Native images | Pulls arm64 images by default |
Pulls amd64 images |
| Running x86 images | Possible via emulation (Rosetta), slower | Native, no emulation |
| Rosetta toggle | Found under Settings → General (Apple Silicon only) | Not applicable |
If an image only ships for Intel, force the platform explicitly:
docker run --platform linux/amd64 some/intel-only-image
On Apple Silicon, enabling Rosetta makes that emulation noticeably faster. Look under Settings → General for a toggle whose exact wording varies by Docker Desktop version (for example, "Use Rosetta for x86_64/amd64 emulation on Apple Silicon") — the label may differ slightly on your version, and this option only appears on Apple Silicon Macs. When building your own images for multiple chips, prefer multi-arch images so they "just work" everywhere.
Verify it works
Run this end-to-end check:
docker run --rm hello-world
The --rm flag auto-deletes the container after it exits. Seeing "Hello from Docker!" with no errors means your install is healthy and ready.
Troubleshooting
Cannot connect to the Docker daemon ... Is the docker daemon running?
Docker Desktop isn't started. Launch the Docker app and wait for the menu-bar whale to stop animating, then retry.
zsh: command not found: docker
The CLI isn't on your PATH yet. Quit and reopen Terminal. If it persists, restart Docker Desktop — it installs the CLI symlinks on first run.
Bind for 0.0.0.0:8080 failed: port is already allocated
Another process is using port 8080. Pick a different host port, e.g. -p 8081:80, then visit http://localhost:8081.
App won't open / "damaged" or "cannot be opened" warning after download This is usually macOS Gatekeeper quarantining a file, often because the download was incomplete — not necessarily a wrong-architecture build. First try right-clicking (or Control-clicking) the Docker app and choosing Open, then confirm in the dialog. If that fails, re-download the build matching your chip (Apple Silicon vs Intel) from the official Docker site and reinstall — a fresh download from the official source is the safe fix.
Next steps
- Write a
Dockerfileand build your own image withdocker build. - Run multi-container apps with Docker Compose (
docker compose up). - Learn volumes for persistent data and networks for container-to-container communication.
- Read the official docs: https://docs.docker.com/get-started/.
Discussion 1
Join the discussion
Sign in with GitHub to comment and vote.
i love how this tutorial covers the difference between images and containers, it's so similar to how rust handles binaries and processes, wonder if there's a way to integrate docker with rust's build tooling for even more efficient deployments 🚀