I had resisted Docker. Now I use Container
ContenidoContents
I had always resisted Docker. Too much of a stack for what I was doing on a Mac.
Today Tim Sneath called Apple’s Container “perhaps the coolest macOS app you’re sleeping on.” You install it with brew install container. I have tried it, and I have started using it for development.
What it is
Container runs Linux on the Mac. Each container lives in its own lightweight virtual machine, on Apple silicon, with no Docker Desktop. It needs macOS 26 or later.
I have tried it on the Mac mini M6, the 32 GB one, with macOS 27.3 and container 1.7.1. Installing and starting the runtime and the kernel takes about 12 or 13 seconds. A cold start, with the image already downloaded, about 0.5 s. Postgres is ready in about 2 s. Building the PHP image takes around a minute. A Moodle CLI install, about 44 s.
One Moodle per version
The point is not a single container. It is being able to have several versions at once, each with its own PHP and PostgreSQL.
| Moodle | PHP | PostgreSQL | Port |
|---|---|---|---|
| 4.5 | 8.3 | 16 | 8045 |
| 5.0 | 8.4 | 16 | 8050 |
| 5.1 | 8.4 | 16 | 8051 |
| 5.2 | 8.4 | 16 | 8052 |
| 5.3 | 8.4 | 17 | 8053 |
All five install, login returns 200 and cron runs. The scripts live in ~/moodle-containers/: up.sh, down.sh, reset.sh (a clean Moodle in a minute), status.sh and plugin.sh.
Each container reserves 2 GB, but inside it uses about 230 to 260 MB. On the Mac, each virtual machine sits between 0.8 and 1 GB, plus about 700 MB for the container service. On disk, between the template and the images, about 19 GB.
How I test plugins
I used to link plugins into the local Moodle with symlinks. That does not work with containers: the Moodle inside the container cannot see the Mac’s paths, and the symlink would point to a folder that does not exist in there.
Now I mount the plugin folder directly in the place it belongs inside each version’s Moodle. For example: ./plugin.sh 5.2 ~/moodles/plugins/local_mcpserver --ro.
Changes to the code on the Mac show up in the container at once, just as they did with the symlinks. With --ro, the container cannot write to the original code. The same plugin can be mounted on all five versions, from 4.5 to 5.3, at the same time, so I can try it on all of them without copying anything. Moodle picks up the new plugin version on reload.
Without --ro, the script copies the plugin into that version’s tree and runs the upgrade without asking.
Why containers for testing
Until now, on the M6, everything shared the same Homebrew PHP and Postgres. Moodle 4.5 does not support PHP 8.4, so running several test versions at once on that machine ends in a mess.
With containers, each version is isolated. You throw it away and start again.
So I am leaving it like this: testing, in containers, on the M6. Production — Aula and the sites on the M4 — stays native, which is how I want to serve it. I wrote down how the two machines are split in late October: one serves, and the other works.
What it is not: Docker
There is no Compose. Orchestration is done with the scripts.
On custom networks there is no DNS between containers. They talk by IP, and that IP changes when you recreate them. up.sh fixes dbhost in config.php.
A named volume brings along lost+found, and Postgres refuses to initialize if you mount it right on PGDATA. chown from inside the container fails on bind mounts. And Moodle 5.2 or later uses public/ as the document root and wants composer install even if you download the tarball.
The hole in the network
At first, -p did not reach localhost. “No route to host.” It looked like the macOS Local Network permission, the same one I had already hit with launchd. It was already on.
It is a known bug in container 1.7.1 with subnet routes when Tailscale is on the Mac: issue 1881. There is a fix in 1882, not yet published.
I left an automatic fallback proxy in place. Now -p 127.0.0.1:port:80 goes through directly.
I am leaving the M4 alone: Aula and the sites stay native. For development, on the M6, I have one Moodle per version, isolated, and I can tear it down and bring it back up whenever I want.
Sources: Tim Sneath’s post, 12 November 2026, apple/container, Homebrew formula, issue 1881 and pull request 1882.