Supporting custom Docker Compose looked simple when I first thought about it:
let the user paste a docker-compose.yml ;
save it on the VPS;
run docker compose up -d ;
celebrate. π
The problem is that a Compose file is not just a list of containers.
It can mount the host filesystem, join the host network, access devices, add Linux capabilities, reuse another application's network, publish arbitrary ports, or mount the Docker socketβwhich is effectively control over the Docker host.
So the real workflow cannot be this:
Compose file βββββββββββββββββββββββββββΊ Docker daemon
Enter fullscreen mode
Exit fullscreen mode
It needs a boundary in the middle:
Compose file β βΌ ββββββββββββββββββββββββββββββββ β Parse β Normalize β Inspect β β Transform β Resolve β Check β ββββββββββββββββββββββββββββββββ β β β accepted ββββββΊ refused with a reason βΌ Docker daemon
Enter fullscreen mode
Exit fullscreen mode
This is the problem behind the Compose safety policy in Nitrobase.
Nitrobase has only recentlyβ¦