โ† Back to list

๐Ÿณ 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.

Pankaj Redekar ยท 2026-05-06 09:36 ยท 0 claps ยท 2.0 min read
#docker #docker-desktop #mali #containers #linuxworld
Open on Medium โ†—
Wiki topics: โ˜๏ธ ยท DevOps & Cloud ๐Ÿ”“ ยท Open Source

๐Ÿณ 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-cache unless 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