Linux containers in 500 lines of code (2016)
11–20 of 31 posts
Re: Linux containers in 500 lines of code (2016)
#12Re: Linux containers in 500 lines of code (2016)
#13Re: Linux containers in 500 lines of code (2016)
#14I was actually wondering what the lowest-resource way of launching a bunch of mostly-idle single port applications in isolation currently is. Docker runtime is bloated, Kubernetes has recommended limits (and enforced on cloud providers), Runc feels like you have to implement Kubernetes/Docker on top yourself. Anyone seen anything else out there to run a few thousand single port binaries and multiplex them with a webs…
Re: Linux containers in 500 lines of code (2016)
#15Liz Rice has done some awesome on-stage live coding, including a very small container runtime in go. https://www.youtube.com/watch?v=8fi7uSYlOdc
Re: Linux containers in 500 lines of code (2016)
#16I was actually wondering what the lowest-resource way of launching a bunch of mostly-idle single port applications in isolation currently is. Docker runtime is bloated, Kubernetes has recommended limits (and enforced on cloud providers), Runc feels like you have to implement Kubernetes/Docker on top yourself. Anyone seen anything else out there to run a few thousand single port binaries and multiplex them with a webs…
Re: Linux containers in 500 lines of code (2016)
#17Earlier quoted context omitted.
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}' )"
I agree with you that their code is fairly dense, yours is overly verbose. Having said that, looking at their code, I don’t get the impression they’re optimizing for LOC. There is plenty of verbosity and opportunity to remove lines of code if they wanted.
Re: Linux containers in 500 lines of code (2016)
#18Re: Linux containers in 500 lines of code (2016)
#19I was actually wondering what the lowest-resource way of launching a bunch of mostly-idle single port applications in isolation currently is. Docker runtime is bloated, Kubernetes has recommended limits (and enforced on cloud providers), Runc feels like you have to implement Kubernetes/Docker on top yourself. Anyone seen anything else out there to run a few thousand single port binaries and multiplex them with a webs…
Re: Linux containers in 500 lines of code (2016)
#20Earlier 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}' )"