๐ณ Ditch Docker Desktop: A Clean Lima + Docker Setup on macOS
If youโre developing on macOS and feel like Docker Desktop is eating too much RAM (or just want more control), thereโs a better way.
๐ณ Ditch Docker Desktop: A Clean Lima + Docker Setup on macOS
If youโre developing on macOS and feel like Docker Desktop is eating too much RAM (or just want more control), thereโs a better way.
I recently switched to Lima + Docker CLI, and honestly โ itโs faster, lighter, and way more flexible.
Hereโs a complete guide to get you up and running.

๐ค Why move away from Docker Desktop?
Docker Desktop is convenient, but:
- Itโs resource-heavy (often 2โ4GB idle)
- It abstracts too much (harder to debug)
- Licensing concerns for some teams
๐ With Lima, you get:
- A lightweight Linux VM
- Full control over Docker setup
- Better performance on Apple Silicon
๐งญ What youโll achieve
By the end, youโll have:
- Docker CLI running on macOS
- Docker daemon inside Lima VM
- Multi-arch builds (arm64 + amd64)
- Docker Compose working
- No Docker Desktop needed
๐ Step 1: Install prerequisites
brew install lima docker docker-buildx docker-compose docker-compose-switch
โ๏ธ Step 2: Start Lima Docker VM
limactl start template://docker (or docker-rootful)
This template does a lot for you:
- Creates the VM
- Installs Docker
- Configures networking
๐ Step 3: Verify Lima
limactl list
You should see your VM running.
๐ Step 4: Connect Docker CLI โ Lima
docker context create lima-docker \
--docker "host=unix:///Users/$USER/.lima/docker/sock/docker.sock"
docker context use lima-docker
Now your macOS Docker CLI talks to the Lima VM.
๐๏ธ Step 5: Enable buildx
mkdir -p ~/.docker/cli-plugins
ln -sf $(brew --prefix)/opt/docker-buildx/bin/docker-buildx \
~/.docker/cli-plugins/docker-buildx
Verify:
docker buildx version
๐ Step 6: Create a multi-arch builder
docker buildx create \
--name multiarch \
--use \
--driver docker-container \
--bootstrap
๐ Step 7: Enable multi-arch builds (QEMU)
docker run --privileged --rm tonistiigi/binfmt --install all
This allows you to build amd64 images on Apple Silicon.
๐งฉ Step 8: Enable Docker Compose
mkdir -p ~/.docker/cli-plugins
ln -sf $(brew --prefix)/opt/docker-compose/bin/docker-compose \
~/.docker/cli-plugins/docker-compose
Verify:
docker compose version
๐งช Step 9: Test your setup
docker run hello-world
docker ps
If this works โ youโre done ๐
โ ๏ธ Important notes
- Use
--loadโ for local builds (single architecture) - Use
--pushโ for multi-arch builds - Avoid
--no-cacheunless debugging - BuildKit (
buildx) runs in its own container (separate cache)
โก Bonus: Dev vs Production builds
Local dev (fast):
docker buildx build --platform linux/arm64 --load .
Production (multi-arch):
docker buildx build --platform linux/arm64,linux/amd64 --push .
๐ Final thoughts
Switching to Lima gives you:
- ๐ฅ Better performance
- ๐ง More control
- ๐ป Cleaner setup
You essentially get a DIY Docker Desktop โ but lighter and faster.
If youโre serious about optimizing your dev environment on macOS, this setup is absolutely worth it.
๐ฌ Curious โ are you using Docker Desktop, Colima, or Lima? Would love to hear your setup ๐
๋ฉํ๋ฐ์ดํฐ
- post_id
- fc314857ec75
- slug
- ditch-docker-desktop-a-clean-lima-docker-setup-on-macos-fc314857ec75
- url
- https://medium.com/@pankajredekar/ditch-docker-desktop-a-clean-lima-docker-setup-on-macos-fc314857ec75
- canonical_url
- https://medium.com/@pankajredekar/ditch-docker-desktop-a-clean-lima-docker-setup-on-macos-fc314857ec75
- author_url
- https://medium.com/@pankajredekar
- status
- ok
- fetched_at
- 2026-06-20 20:29:01