4 ms·
If you want to learn about linux container internals, I can recommend just trying to implement one yourself in some random language for fun. I wrote a basic run
by kragniz 10y ago
If you want to learn about linux container internals, I can recommend just trying to implement one yourself in some random language for fun. I wrote a basic runtime in python that can run docker images:
https://github.com/kragniz/omochabako https://github.com/kragniz/omochabako
Quick demo: https://asciinema.org/a/77296?speed=2&autoplay=1 https://asciinema.org/a/77296?speed=2&autoplay=1
- decebalus1 10y agothat sounds pretty cool. Sorry for ignorance (heavy Windows background) but where does one start with something like that? Is there a RFC type of thing for these images or runtime spec?
- archevel 10y agoI started by watching https://www.youtube.com/watch?v=HPuvDm8IC-4 https://www.youtube.com/watch?v=HPuvDm8IC-4 and reading https://www.infoq.com/articles/build-a-container-golang https://www.infoq.com/articles/build-a-container-golang Also "man namespaces" on a linux machine will give some deeper documentation.
- gens 10y agohttps://lwn.net/Articles/531114/ https://lwn.net/Articles/531114/ and https://www.kernel.org/doc/Documentation/cgroup-v1/ https://www.kernel.org/doc/Documentation/cgroup-v1/ (or the newer https://www.kernel.org/doc/Documentation/cgroup-v2.txt https://www.kernel.org/doc/Documentation/cgroup-v2.txt ) Actually all that was said (and somewhat explained) in the article in question. Although i would recommend to try cgroups directly with the kernel.
- deleted 10y ago[deleted]
- archevel 10y agoI second this! I watched Liz Rice's Golang UK 2016 talk and was inspired to write something to create containers. I was also interested in x86_64 assembly so decided to go with that. In the end it is realy simple to create something to run containers even in assembly since it is just a few syscalls to set things up. Ended up with: https://github.com/archevel/quic https://github.com/archevel/quic The main difficulty was figuring out how to do the netns part.
- emeraldd 10y agoMild side note, this technique is the only way I finally wrapped my head around lisp ... Building a scheme. It's definitely a good way to learn things about a system if you can find an appropriate toy level plan to implement.