3 ms·
Where on Earth are you getting that result from? [1] gives an 11 MB image. [1] https://nix.dev/tutorials/nixos/building-and-running-docker-images.html#build-yo
by l0b0 3y ago
Where on Earth are you getting that result from? [1] gives an 11 MB image.
[1] https://nix.dev/tutorials/nixos/building-and-running-docker-images.html#build-your-first-container https://nix.dev/tutorials/nixos/building-and-running-docker-...
- denysvitali 3y agoFrom experience - but I'm more than happy to be proven wrong as I would love to build all the Docker images with Nix. What you linked is the equivalent of: FROM scratch COPY hello-world /hello-world Of course that's small (hello-world is statically linked). Try to add coreutils (or any other small package) and you'll see what I mean. In my experience the size of a Docker image built with some nix packages is greater than the Debian counterpart. I don't know why though.
- georgyo 3y agoNo, that dockerfile is not equivalent because the hello-world is not statically built in the nix version. However I'll give you that it could be smaller in more complex examples. For example glibcLocales is for all locales which is quite chunky but your application only needs one locale.