Earlier quoted context omitted.
I think I'm being particularly dense here, but do you mean the proxy is proxying to your tiny 1kb container? If so, what happens to the traffic? Or because the tiny container is running the proxy proxies somewhere else? i.e you're using the presence of a container with a label as configuration for the proxy?
I know, it's a bit difficult to explain and a tad confusing. No, the proxy is not sending any traffic to the container. Rather, the container, by simple virtue of being in the running state, tells the proxy to send requests to the domain specified by the label on the container.
A 1 KB Docker Container
21–30 of 75 posts
Re: A 1 KB Docker Container
#22I have one that is 344 bytes: https://github.com/dseevr/cpu_consumer It just runs a tight loop that consumes an entire core.
Re: A 1 KB Docker Container
#23Earlier quoted context omitted.
If you base off alpine, you can get useful containers quite a lot smaller than 100MB. One example i use is an agent i deploy to kubernetes clusters to do some security scanning. The scripts are ruby and the image clocks in at 9MB compressed https://hub.docker.com/r/raesene/kaa-agent/tags/
Yes, I use Alpine for a lot of my other containers. I love the simplicity of the package manager as well.
Re: A 1 KB Docker Container
#24Re: A 1 KB Docker Container
#25Earlier quoted context omitted.
I know, it's a bit difficult to explain and a tad confusing. No, the proxy is not sending any traffic to the container. Rather, the container, by simple virtue of being in the running state, tells the proxy to send requests to the domain specified by the label on the container.
What happens if the container isn't running?
Re: A 1 KB Docker Container
#26Earlier quoted context omitted.
Yes, I use Alpine for a lot of my other containers. I love the simplicity of the package manager as well.
Alpine's package manager has the great property that you don't need to update the index in order to fetch a package IIRC; the whole `apt-get update && apt-get install && ` dance is quite tedious in debian-based Docker containers.
Re: A 1 KB Docker Container
#27The 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
#28The 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!)
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 container and around 3.5MB for the "containerd-shim" go binary that parents the container.
"containerd" and "dockerd" both probably have a little extra resource usage per container they're managing, but I'd guess that's on the order of about 200KB per at most.
The next big limit you'll hit is the process/pid limit (/proc/sys/kernel/pid_max) which defaults to 32k.
Fortunately, due to the memory overhead of a bit under 4MB, you probably won't get there on your 64GB of ram server and might cap out at around 15k containers total.
Experimentally, my linux laptop (running docker 17.06) is able to run 1100 copies of that sleeping-beuaty container using almost exactly 2GB RSS additional memory and no noticeable additional cpu
This is even better than I calculated above, possibly due to shared memory for containerd-shim. I'm not investigating further.
Re: A 1 KB Docker Container
#29Earlier 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!)
That is very low. The current official limitation in OpenShift (a Kubernetes distro) is 250 but there have been lab clusters which have gone higher.
Re: A 1 KB Docker Container
#30eg. https://hub.docker.com/r/0xff/asmttpd/
7KB web server container.