News for hackers. Stuff that matters.
Re:Containers are chroot with a marketing budget by nine_k on Wednesday November 09, 2022 @02:48AM (#33528537)
Frankly, you don't need much more for a proof of concept. Beside chroot, you basically need a namespace control utility, an iptables control utility, and a volume control utility.

The "Docker in 100 lines of bash" [1] does just that. It skips the trouble of managing volumes by demanding btrfs; it could instead use stuff like tar / dd and mount to a comparable effect.

This is, of course, about as fiddly, slow, and unreliable as, say, building an amplifier with discrete transistors, or building a clock with nixie tubes and 74xx chips, etc. The point is not in producing a sleek and reliable solution (though this is not ruled out), but in seeing and understanding how a thing works from inside.

[1]: https://news.ycombinator.com/item?id=9925896

Re:Containers are chroot with a marketing budget by gsaussy on Wednesday November 09, 2022 @06:48PM (#33539925)
Also, if you choose not to use the `iptables` command line utility and want to handle network isolation by directly chatting with the kernel over a netlink socket, then you basically have to cargo cult someone else's implementation.

AFAIK the clearest documentation has been reading the Docker networking code.

https://man7.org/linux/man-pages/man7/rtnetlink.7.html