Linux containers in 500 lines of code (2016)
21–30 of 31 posts
Re: Linux containers in 500 lines of code (2016)
#22Re: Linux containers in 500 lines of code (2016)
#23Re: Linux containers in 500 lines of code (2016)
#24I'm wondering if MacOS has the requisite system calls to have its own native containers, I imagine it does, Darwin being based on BSD. Are there any products that use that functionality?
Sure with enough changes MacOS could support it, but then with enough changes to anything, so that is not really a sensible measure.
Re: Linux containers in 500 lines of code (2016)
#25I'm wondering if MacOS has the requisite system calls to have its own native containers, I imagine it does, Darwin being based on BSD. Are there any products that use that functionality?
Not sure how you get from Darwin being based on BSD to Darwin should be able to support something which heavily relies on Linux specific functionality to the point where even Freebsd having trouble https://wiki.freebsd.org/Docker Sure with enough changes MacOS could support it, but then with enough changes to anything, so that is not really a sensible measure.
FreeBSD has jails, which are a native type of container on freebsd.
However, BSD operating systems are really different from each other. OpenBSD doesn't have jails or anything too like containers, and macOS does have sandboxes (which are kinda like a container in some way), but no proper containers.
Docker isn't really related to the question of whether a native container solution exists on non-linux platforms.
Re: Linux containers in 500 lines of code (2016)
#26I'm wondering if MacOS has the requisite system calls to have its own native containers, I imagine it does, Darwin being based on BSD. Are there any products that use that functionality?
Re: Linux containers in 500 lines of code (2016)
#27I'm wondering if MacOS has the requisite system calls to have its own native containers, I imagine it does, Darwin being based on BSD. Are there any products that use that functionality?
Re: Linux containers in 500 lines of code (2016)
#28I'm wondering if MacOS has the requisite system calls to have its own native containers, I imagine it does, Darwin being based on BSD. Are there any products that use that functionality?
Not sure how you get from Darwin being based on BSD to Darwin should be able to support something which heavily relies on Linux specific functionality to the point where even Freebsd having trouble https://wiki.freebsd.org/Docker Sure with enough changes MacOS could support it, but then with enough changes to anything, so that is not really a sensible measure.
It would be more appropriate to compare the XNU micro kernel used in Darwin to the Linux kernel used in GNU/Linux in your analogy.
Re: Linux containers in 500 lines of code (2016)
#29Probably because pivot_root is a speciality that is used in initramfs boostrapping and is exposed to that scriptology via the pivot_root program that comes from the util-linux project.
Re: Linux containers in 500 lines of code (2016)
#30Earlier quoted context omitted.
Only the first few lines of the script look dense. Everything else looks normal to me.
Stuff like https://github.com/p8952/bocker/blob/master/bocker#L94 is super dense. I might write that something like: cid="$( ps o ppid,pid | grep "^$( ps o pid,cmd | grep -E "^\ *[0-9]+ unshare.*$1" | awk '{print $1}' )" | awk '{print $2}' )"