TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: What languages/ecosystems offer the smallest container sizes?

4 pointsby nighmialmost 2 years ago
(Inspired by this: https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=36653340 and Whartung&#x27;s observation that Linux forums used to bring up packaging the run time.)<p>What languages can fit in the smallest container with a functioning e.g. echo server?<p>More interestingly: What&#x27;s the smallest production container you&#x27;ve seen and how was it accomolished?<p>You can build scratch containers with just a Go binary, which packages the runtime in about 1.5MB, not much more for an echo server.<p>With Racket (a Lisp&#x2F;Scheme) you&#x27;d need to package a minimal OS like Alpine Linux and then minimal Racket (without the IDE etc.), giving you about 80MB.<p>I don&#x27;t know Rust, but I&#x27;ve seen some containers around 10MB in it. I expect they can get much smaller when not packing so much functionality.<p>A quick Google shows a toy C container under 1KB! [1]<p>What&#x27;s rhe smallest you can do with the JVM? Or Nim, Zig etc.? Perhaps a Fortran or Ada container? [1] https:&#x2F;&#x2F;blog.hypriot.com&#x2F;post&#x2F;build-smallest-possible-docker-image&#x2F;

2 comments

gregjoralmost 2 years 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&#x27;t have to.
评论 #36750025 未加载
sargstuffalmost 2 years ago
0 byte container where network card hardwired to echo receiving information to serial line with screen attached &amp; echoes display string back to sending IP.<p>8 bit iot application : <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Contiki" rel="nofollow noreferrer">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Contiki</a>