Skip to content
Barely

About Barely

Why Barely exists

Barely is a memory-conscious guest VM and Mac app for docker.

The trial needs no account, email or credit card. Buy, $99 →

Every running container uses RAM

Docker on a Mac runs inside a Linux VM. Every running container uses RAM in the VM, including the ones you aren't working on.

A docker build grows the VM's RAM, and the VM keeps that RAM after the build ends. A stopped container's RAM stays with the VM instead of going back to macOS. The only way to give the VM's RAM back to macOS is to quit docker and start every container again.

When the VM holds more RAM than your Mac can spare, macOS swaps to disk and your Mac slows down.

Activity at All with three docker compose stacks: shop up and holding memory, blog and logs-demo asleep with almost none
Two docker compose stacks asleep, one at work. Only the containers at work are holding memory.

What Barely does about it

When containers serve no traffic, write no logs and use no CPU, Barely pauses them and gives their RAM back to macOS. Once all containers are asleep, the VM saves its memory to disk and exits.

  • Wakes a container on a request to its port, a docker command or a file saved in its folder.
  • Wakes in milliseconds, with every process where it was. Nothing restarts.
  • Containers with scheduled work, like cron or a systemd timer, stay awake.
  • RAM a running container frees goes back to macOS.
  • The next docker command brings a hibernated VM back in about a quarter of a second.

The app shows what every container is using, every container's logs in one place, and where the VM's memory goes.

Who it's for

For

  • Several docker compose stacks, most of them idle at any one time.
  • A Mac that runs short of RAM with docker up.
  • An Apple Silicon Mac with macOS 14 or later.

Not for

  • arm64 images only, no Rosetta. An image built only for Intel and AMD (amd64) won't run.
  • No built-in Kubernetes
  • No IPv6 inside the VM

Measured on a MacBook Air

On a MacBook Air with 16 GB of RAM, a request to a sleeping container's port was answered in 10 to 60 milliseconds, waking the container on the way. A docker exec into a sleeping container took under a tenth of a second. After the VM hibernated, the next docker command was answered in about a quarter of a second.

On a 16 GB Mac, a build took the VM to 7.0 GB. Within 30 seconds of the build ending, the VM was back to 2.4 GB, what the running stack needed.

Through five hibernates in a row under load, all 2,735 requests were answered. A 256 MB file held in memory came back byte for byte after a hibernate.

The VM's memory chart around a build: up to 7.0 GB, back to 1.7 GB, with a green band for what went back to macOS
The VM's memory around a build. Up while it ran, back down after. The green band is what went back to macOS.

What it does to your Mac, and how to undo it

brew install barelyvm/tap/barely
barely setup
barely uninstall

Setup asks first. Setup checks for the docker command and asks before each change it makes.

Your docker can stay. What you run docker with now can stay installed while you try Barely.

Leaving is one command. barely uninstall puts docker back the way it was and keeps your images and volumes.

30-day trial · 30-day refund

Install it and try it for 30 days

The trial needs no account, email or credit card. What you run docker with now can stay installed while you try it. Purchase at any time, $99 once.

brew install barelyvm/tap/barely
barely setup
docker compose up

Needs an Apple Silicon Mac with macOS 14 or later, plus Homebrew and the docker command.

Buy, $99