Live data from Hacker News

A 1 KB Docker Container

blog.quickmediasolutions.com

41–50 of 75 posts

Re: A 1 KB Docker Container

#41
post #38
post #30

Reminded me of people making docker containers out of this: https://github.com/nemasu/asmttpd eg. https://hub.docker.com/r/0xff/asmttpd/ 7KB web server container.

Are there any non-academic reasons to do use such servers?

Embedded stuff like routers? Serving a user manual for some network connected thing with a microcontroller?

Re: A 1 KB Docker Container

#42

As part of a competition before the last DockerCon I managed to get a container down to 69B Details: http://thebsdbox.co.uk/in-pursuit-of-a-tinier-binary-er/ Code: https://gist.github.com/thebsdbox/29e395299f89b52214b66269f5...

Is "69 bytes" for the binary, or for the whole container image? I would expect at least some metadata.

Re: A 1 KB Docker Container

#43
post #28

Earlier 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…

What happens when you hit the limit? Thrashing swap or oom kills? (And what kind of overcommit policy did you use?)

Re: A 1 KB Docker Container

#44
post #6

Earlier 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/

On the same note I did a mariadb container that is ~12mb: https://hub.docker.com/r/jbergstroem/mariadb-alpine/ If you're into go, it's not too hard to get very small ( https://gist.github.com/jbergstroem/680cb7db6f90319dcd7666f3...

5mb still sounds like a lot, considering you could squeeze Linux 1.3 on a 1.44 mb floppy with a (compressed) rootfs... I mean does the runtime really do that much more than a full (although old) os kernel and a C library/runtime and apps?

Re: A 1 KB Docker Container

#45

Earlier quoted context omitted.

What happens if the container isn't running?

Then the proxy will not route requests to the host specified by the container's label.

You're using the running state flag of a container as an IPC mechanism?

Re: A 1 KB Docker Container

#46
I developed a little side project that aimed to be a serveless open source alternative, it is called effe and uses go as main language.

The whole idea is to compile a go program and put it into a docker container and have it listening to the network for a single HTTP endpoint.

It is interesting because an useful images come to be less than 6MB :)

Link to the project: https://github.com/siscia/effe-tool

Re: A 1 KB Docker Container

#47
OT, what's the smallest windows/.net containers out there? I have some legacy stuff I'd like to dockerize but they end up so big and slow to deploy. I've just been rewriting them.

Re: A 1 KB Docker Container

#50
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.
Post reply on HN