Why Docker uses CPU and memory on a Mac
Containers need a Linux kernel, so Docker Desktop starts a lightweight Linux virtual machine. In Activity Monitor you see that VM (and Docker's helper processes), not your individual containers. Its usage is the total of:
- Busy containers: databases, build steps, watchers or anything stuck in a loop.
- File sharing: containers reading and writing files that live on your Mac, especially with file watchers on big folders.
- Emulation: running images built for Intel (amd64) on an Apple silicon Mac, which needs translation.
- The VM's memory: memory given to the VM is held while it runs.
How to bring it down
- Find the busy container. Run
docker statsin Terminal to see CPU and memory per container, then stop or fix the heavy one. - Stop what you aren't using.
docker compose downin a project folder, or stop containers from Docker Desktop's dashboard. - Set resource limits. In Docker Desktop, open Settings › Resources and lower the CPU and memory limits to what your projects really need.
- Use the faster file sharing option. Recent Docker Desktop versions offer VirtioFS for file sharing on Mac in Settings › General. It's usually much faster for bind mounts.
- Use native images. On Apple silicon, prefer arm64 images. If you must run amd64 images, Docker Desktop's option to use Rosetta for x86/amd64 emulation is usually faster than the default emulation.
- Let Docker rest when idle. Recent versions have a Resource Saver mode that pauses the VM when no containers are running. Or quit Docker Desktop when you're done.
Docker uses memory even with no containers
The VM keeps some memory while Docker Desktop is running, even if nothing is running inside it. That's expected. Lowering the memory limit, using Resource Saver, or quitting Docker Desktop gives it back.