Live data from Hacker News

Building a Linux Container Using Namespaces: Part – 1 (2020)

polarsparc.com

11–20 of 24 posts

Re: Building a Linux Container Using Namespaces: Part – 1 (2020)

#12

A side note: the page does not declare utf-8 encoding. I have manually change it to resolve some of garbled text.

Out of curiosity, which browser are you using?

Google Chrome

Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36

Re: Building a Linux Container Using Namespaces: Part – 1 (2020)

#13
post #3

See also: * The What, Why and How of Containers ( https://www.annwan.me/computers/what-why-how-containers/ ) * Containers from Scratch ( https://ericchiang.github.io/post/containers-from-scratch/ ) * Linux Containers From Scratch in C ( https://www.lucavall.in/blog/barco-linux-containers-from-scr... ) * Life of a Container ( https://indradhanush.github.io/blog/life-of-a-container/ )

thank you very much was looking for more good resources

Re: Building a Linux Container Using Namespaces: Part – 1 (2020)

#17
post #15

If you were looking to create testing for networking, i.e., simulating network dropouts for a client-server connections, is this something that you can use namespaces for, or would virtual machines be more fit for purpose?

It may be both.

You could possibly just use network namespaces.

While I am too familiar with it to suggest effort required, looking at the Openstack project and how they provision tenant networks may help.

It is just python with a three tier model with a message bus. But how they interface with libvirt may help if the namespace abstraction support for the 'ip' command is too clunky for you.

It doesn't give you independent stacks and openvswitch will let you build almost anything you would need.

Re: Building a Linux Container Using Namespaces: Part – 1 (2020)

#18
post #4

Based on Ubuntu 18.04, which is pretty old now. Are there any relevant changes for 22.04 or 24.04 or is this stuff stable now?

Yes this looks like it is using cgroups v1 and v2 does changes things up enough that its not a great guide.

Re: Building a Linux Container Using Namespaces: Part – 1 (2020)

#20
post #15

If you were looking to create testing for networking, i.e., simulating network dropouts for a client-server connections, is this something that you can use namespaces for, or would virtual machines be more fit for purpose?

Look up tc, the traffic control utility that interacts with the Kernel's packet scheduler using the netfilter framework.
Post reply on HN