How to run Docker on a Mac without Docker Desktop
By EZGH Cloud · · 3 min read
In short
Install the Docker CLI, Buildx and Compose from Homebrew, run a container engine in a lightweight VM (this guide uses EZGH DevRun), and point the CLI at it with one environment command. Your docker and docker compose commands then work as before, with no Docker Desktop installed.
Docker Desktop bundles three things: the docker command-line client, a Linux VM with the Docker
Engine inside it, and a GUI. On a Mac you only need the first two, and the client doesn’t care
which engine it talks to. This guide replaces Docker Desktop with the Docker CLI from Homebrew and
EZGH DevRun, a desktop app and CLI that runs containers in a lightweight VM on Apple Silicon.
What you need
- An Apple Silicon Mac (M1 or later) with macOS 13 Ventura or later.
- Homebrew for the Docker command-line tools.
- About 125 MB for the DevRun download. Its VM disk is sparse, so it only uses the space your images and volumes take.
1. Install DevRun and start it
Download DevRun, open the disk image and drag DevRun to Applications. Open it: the VM starts on its own, and the status bar turns to Running when containers are ready.
DevRun isn’t notarized by Apple yet, so macOS asks you to confirm the first launch. Go to System Settings › Privacy & Security and click Open Anyway. You only do this once.
2. Install the devrun CLI
The app doesn’t add devrun to your PATH, so install the CLI once:
sudo mkdir -p /usr/local/bin
curl -fsSL https://devrun.app/download/cli | sudo tar -xz -C /usr/local/bin devrun
devrun --version
3. Install the Docker CLI, Buildx and Compose
brew install docker docker-buildx docker-compose
Buildx and Compose are Docker CLI plugins, and Homebrew installs them where the CLI doesn’t look
by default. Add Homebrew’s plugin folder to ~/.docker/config.json (create the file if it doesn’t
exist, and merge the key if it does):
{
"cliPluginsExtraDirs": ["/opt/homebrew/lib/docker/cli-plugins"]
}
Check that both plugins load:
docker buildx version
docker compose version
DevRun needs Buildx 0.14 or newer. At the time of writing Homebrew ships Docker CLI 29.9, Buildx 0.38 and Compose 5.6, the versions DevRun is tested with.
4. Point Docker at DevRun
Set up DevRun’s builder once, then point the current shell at DevRun:
devrun builder-setup
eval "$(devrun docker-env)"
docker-env sets DOCKER_HOST to DevRun’s private socket and BUILDX_BUILDER to its builder,
for this shell only. To use DevRun in every new terminal, add the eval line to ~/.zshrc.
5. Run something
docker run --rm alpine:3.23 echo hello
docker compose up --build
docker ps
Published ports listen on 127.0.0.1, so a service on -p 8080:80 is at
http://localhost:8080. Containers, images and volumes are shared between the Docker CLI, the
devrun CLI and the app, so whatever docker compose up starts shows up in DevRun’s window too.
What works, and what doesn’t yet
DevRun implements the parts of the Docker API that day-to-day development uses:
| Works | Not supported yet |
|---|---|
docker run, ps, logs, exec -it, attach, stats, events |
UDP port publishing |
docker compose projects with named networks and service aliases |
Custom network drivers and IPAM |
docker build and compose up --build on BuildKit |
Pushing images; private registry credentials |
Named volumes and bind mounts from your home folder and /tmp |
Building for architectures other than ARM64 |
Unsupported operations return an error rather than doing something unexpected.
Troubleshooting
Cannot connect to the Docker daemon. The shell isn’t pointed at DevRun, or DevRun isn’t
running. Open the app, then run eval "$(devrun docker-env)" in that shell.
docker: 'buildx' is not a docker command. The CLI can’t find Homebrew’s plugins. Check the
cliPluginsExtraDirs entry in ~/.docker/config.json.
A bind mount fails. By default DevRun shares your home folder and /tmp. Share other folders
under File sharing in the app or with devrun share configure; new folders apply after the VM
restarts.
Hot reload doesn’t notice your edits. File changes made on the Mac don’t raise file system events inside containers, so dev servers need to poll. See why hot reload stops working in Docker on a Mac.
Frequently asked questions
- Can I use the docker command without Docker Desktop?
- Yes. The docker command is a client. It talks to whichever engine DOCKER_HOST points at. Install the CLI with Homebrew (brew install docker) and point it at another engine, such as DevRun's, with devrun docker-env.
- Does docker compose work without Docker Desktop?
- Yes. Install the Compose plugin (brew install docker-compose), add Homebrew's plugin folder to cliPluginsExtraDirs in ~/.docker/config.json, and run docker compose as usual against DevRun.
- Do I need Rosetta or an Intel Mac?
- No. DevRun runs ARM64 Linux containers natively on Apple Silicon Macs with macOS 13 or later. Intel Macs aren't supported.
- Will this change my existing Docker setup?
- No. devrun docker-env only sets environment variables in the shell where you run it. Saved Docker contexts, your default builder and stored credentials stay as they are.