Re:How Containers Work: Overlayfs
by mikepurvis on Tuesday November 19, 2019 @10:20AM
(#21573722)
Fantastic, this is exactly what I was looking for, thanks for the pointer!
It looks like the layer limitation comes from the underlying union filesystem stuff and not from anything inherent in Docker itself. I wonder if it would be possible to build a new filesystem driver for Docker that could serve up an infinite ecosystem of immutable nix packages without having to actually unpack them. Whether such a thing would actually be of value would probably depend a lot on the use case, but I could imagine a CI type scenario where you wanted to have a shared binary cache and individual nodes able to come up very fast without having to unpack the pkgs and prepare a full rootfs each time.
[0]: https://grahamc.com/blog/nix-and-layered-docker-images