Hey folks,
I've been using Apple's container CLI since WWDC and love the VM-per-container security model. But coming from Docker, I kept hitting friction points in my daily workflow:
- No
docker-compose.yml support — I have multi-service projects I couldn't easily migrate
- No
docker ps-style table output with status, ports, names
- No
docker network/docker volume subcommands
- No
--name, --restart, --label flags on container run
- Scripts that assumed
docker just broke
So I built Mocker — a thin Docker-compatible CLI wrapper written in Swift that delegates to container under the hood.
What it does:
- Same commands and flags as Docker (
run, ps, stop, rm, exec, logs, build, inspect, stats, ...)
mocker compose up -d reads your existing docker-compose.yml with full dependency ordering, variable substitution, networks and volumes
- Existing Docker scripts work without modification — just replace
docker with mocker
- Persists container/network/volume metadata as JSON in
~/.mocker/
What it doesn't do:
- It's not reimplementing the runtime — it's just a compatibility and orchestration layer on top of what Apple already built
A few things I ran into building this that might be worth noting as missing features or docs gaps:
-
No --rm equivalent in container run — had to implement stop+delete manually, and container stop on an already-exited container waits for the full graceful shutdown timeout (~10s). Would be great to have a --rm flag or a way to skip stop for already-exited containers.
-
container compose — is this on the roadmap? Would make tools like mine unnecessary.
-
virtiofs + chown — postgres and similar images that chown their data directory at init fail with "Operation not permitted". Known limitation, just flagging it for anyone who hits it.
Happy to hear if there's a better approach, or if any of this is already planned. The project is open source if anyone wants to poke at it.
Hey folks,
I've been using Apple's
containerCLI since WWDC and love the VM-per-container security model. But coming from Docker, I kept hitting friction points in my daily workflow:docker-compose.ymlsupport — I have multi-service projects I couldn't easily migratedocker ps-style table output with status, ports, namesdocker network/docker volumesubcommands--name,--restart,--labelflags oncontainer rundockerjust brokeSo I built Mocker — a thin Docker-compatible CLI wrapper written in Swift that delegates to
containerunder the hood.What it does:
run,ps,stop,rm,exec,logs,build,inspect,stats, ...)mocker compose up -dreads your existingdocker-compose.ymlwith full dependency ordering, variable substitution, networks and volumesdockerwithmocker~/.mocker/What it doesn't do:
A few things I ran into building this that might be worth noting as missing features or docs gaps:
No
--rmequivalent incontainer run— had to implement stop+delete manually, andcontainer stopon an already-exited container waits for the full graceful shutdown timeout (~10s). Would be great to have a--rmflag or a way to skip stop for already-exited containers.container compose— is this on the roadmap? Would make tools like mine unnecessary.virtiofs + chown — postgres and similar images that
chowntheir data directory at init fail with "Operation not permitted". Known limitation, just flagging it for anyone who hits it.Happy to hear if there's a better approach, or if any of this is already planned. The project is open source if anyone wants to poke at it.