Hacker News new | ask | show | jobs
by rockyj 41 days ago
That is a strange title / comparison. Docker images (even slimmed down) have an OS (most likely a Linux distribution), some libs and the runtime needed for a programming language. On it's own a "game engine + WASM binary" is not comparable.
4 comments

    > "Docker images (even slimmed down) have an OS (most likely a Linux distribution)"
Not necessarily. Docker images can be based from the "scratch" container, and may contain only a single binary. With static compilation, the libraries can be included in the binary.

The O/S is provided by the container-host (which is usually a linux VM).

This doc describes building an image from "scratch": https://docs.docker.com/build/building/base-images/#create-a...

Seriously, this is a ridiculous comparison. It's apples to oranges.

This site used to have interesting technical discussions, but now its all either AI cheerleading, or vibe coder blog posts.

Maybe it's a good reminder to _not_ bundle an entire OS in a Docker image
FWIW, the base images they're talking about do not contain an entire OS. In fact, they're lacking a colossal amount of the most basic stuff that qualifies as 'an entire OS'. In many cases, your base images are 'a program to install more stuff if you need it', a shell, and coreutils.
For debugging image it's sometimes nice to be able to actually do stuff in the container, but for production image I'd agree.
Some tricks:

docker run -it --rm --pid=container:myapp --network=container:myapp --cap-add SYS_PTRACE nicolaka/netshoot

kubectl debug -it pod-name --image=nicolaka/netshoot

And that's why Docker images are terrible as a packaging format. No sane packaging format should ever prevent software composition.
Container images don't need an OS. You can always do "FROM scratch" and only copy what's needed to run the binary. If it's completely self contained one executable is enough.