Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



Which 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.


I found this project to be an interesting POC of how it all actually works.

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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: