3 ms·
What we all know as Docker and containers is really just fancy chroot. On non Linux systems, it's fancy chroot inside a Linux VM.
by aussieguy1234 2y ago
What we all know as Docker and containers is really just fancy chroot.
On non Linux systems, it's fancy chroot inside a Linux VM.
- immibis 2y agoWhich raises the question of why they need chroot if they have the VM. Another semi-related but equally odd view: Docker is an operating system and containers are processes. The difference between Docker and chroot, by the way, is that Docker does a bunch more system calls to ch the root of several other things that are not the filesystem. It also sets up things inside those roots for you by default, so your containers can access the internet, for example.
- aussieguy1234 2y agoI found this project to be an interesting POC of how it all actually works. https://github.com/p8952/bocker https://github.com/p8952/bocker Basically, it runs docker containers using chroot to prove that it's possible. Docker uses Layered Filesystems (Multiple Filesystems mounted under the same folder on top of one another), something that used to be mostly used when you have a read only Filesystem, like a cdrom, then mount a writeable folder over the same mount point to make that folder writeable. Bocker does a similar mounting of the layers with chroot to run docker containers.