We already have a portable container format for executables with no dependencies... It's called an ELF binary... Why would you even put a static binary in a container in the first place? I don't get it.
A 1 KB Docker Container
61–70 of 75 posts
Re: A 1 KB Docker Container
#62Earlier quoted context omitted.
Interesting. Incidentally, > It was created to test how many containers docker can spin up What was the answer? I'd think on the order of 200-300 on a server with 64 GB of RAM. (Pure guess!)
Depends on several other variables. If you use default docker options, you'll be creating a veth pair per container. You might run into a limit there at around 1024 containers. You also might hit ulimit if your system isn't well configured. If you use --net=none, you won't hit that issue, and you'll probably be able to manage quite a few The resource usage ends up being roughly 4 bytes rss for the executable in the c…
Re: A 1 KB Docker Container
#63Earlier quoted context omitted.
Interesting. Incidentally, > It was created to test how many containers docker can spin up What was the answer? I'd think on the order of 200-300 on a server with 64 GB of RAM. (Pure guess!)
I would expect a 64 gig machine to be able to host 200-300 VMs, and an order or two magnitudes more containers
Re: A 1 KB Docker Container
#64We already have a portable container format for executables with no dependencies... It's called an ELF binary... Why would you even put a static binary in a container in the first place? I don't get it.
And in most real world cases, you will still need at least libc and ca-certificates.
Re: A 1 KB Docker Container
#65Earlier quoted context omitted.
You still need to administer the box it runs on. Offloading that to others is often useful.
I guess you mean something like Compose or Kubernetes. I think it's weird these things force you to use the docker runtime, personally. I would really love a more flexible definition in kubernetes of what a "resource to be ran" means. I know they support multiple container runtimes now, but what if I dont want a container runtime at all? Nomad supports raw executables to be downloaded and scheduled, which is nice( ht…
Kubernetes also supports extensions like the Third Party Resource or their successor, Custom Resource Definitions. KubeVirt[1] is an example of extending resources to include VMs
[0] http://blog.kubernetes.io/2016/12/container-runtime-interfac...
Re: A 1 KB Docker Container
#66Re: A 1 KB Docker Container
#67Earlier quoted context omitted.
> but the bare minimum container that does something useful in practice is rarely less than 100 MB in size. I’ve made containers using code written in most common programming languages (python/go/ruby/c/rust/heck even PHP/etc) which were easily under 100mb, most significantly less. If your containers are frequently >100mb, I say you’re either using the JVM or are doing it wrong!
Actually, even the entire JVM is below 60MB without Jigsaw, with Jigsaw it can go as low as 10MB
Re: A 1 KB Docker Container
#68The smallest useful container I know of is 129B. It was created to test how many containers docker can spin up while reducing the overhead of what was in the container itself. tianon/sleeping-beauty latest 2e8193709fa7 6 months ago 129B https://github.com/tianon/dockerfiles/tree/master/sleeping-b...
Interesting. Incidentally, > It was created to test how many containers docker can spin up What was the answer? I'd think on the order of 200-300 on a server with 64 GB of RAM. (Pure guess!)
Re: A 1 KB Docker Container
#69Earlier quoted context omitted.
What happens when you hit the limit? Thrashing swap or oom kills? (And what kind of overcommit policy did you use?)
I didn't hit any limit, but since I don't have swap it would likely be oom kills. The first part of my post is speculating, the second part I ran an arbitrary number and observed resource usage to allow extrapolation, but didn't hit a limit.
Re: A 1 KB Docker Container
#70Earlier quoted context omitted.
I guess you mean something like Compose or Kubernetes. I think it's weird these things force you to use the docker runtime, personally. I would really love a more flexible definition in kubernetes of what a "resource to be ran" means. I know they support multiple container runtimes now, but what if I dont want a container runtime at all? Nomad supports raw executables to be downloaded and scheduled, which is nice( ht…
Kubernetes absolutely does not force you to use the docker runtime. In fact, there has been a lot of work to avoid this by creating the CRI[0]. Kubernetes also supports extensions like the Third Party Resource or their successor, Custom Resource Definitions. KubeVirt[1] is an example of extending resources to include VMs [0] http://blog.kubernetes.io/2016/12/container-runtime-interfac... [1] https://github.com/kubevi…