Hacker News new | ask | show | jobs
by gregjor 1066 days ago
C, Rust, Go binaries are not containers, if you mean something like Docker. A VM is not a container either. You need to make a clearer distinction between compiled languages with no runtime (C), compiled languages with a runtime component (Go, Rust), languages that run in an interpreter with a runtime component (Python, Ruby, PHP), languages that run in a VM (Java, C#), and containers (Docker). You can run anything in a Docker container but you don't have to.
1 comments

How could I make that clearer? I explicitly asked about what language ecosystems offer the snallest production containers and gave examples.
Your question was not clear to me because it conflates containers (Docker) with runtimes and VMs.

No container at all will give the smallest production container, so a compiled language with no runtime (C) or one with a small runtime (Go) answers your question.

If you must use containers for some reason, the container stuff (e.g. Docker) imposes a constant overhead regardless of the contents, so you can set that aside and just add up the size of the application binary plus runtime plus dependencies. C will likely come out at the top of the list, .NET and Java at the bottom.

See this: https://tech-couch.com/post/producing-smaller-docker-images-...

Techniques described would apply to any application language.