Resulting image size is 5GB. How can I slim it down? I guess what I want is to leave only neccessary runtime for executable, and delete all the build tools.
I managed to use justStaticExecutables to reduce the size.
The official documentation was this nixpkgs/doc/language-frameworks/haskell.section.md.
I just had to wrap the output of callPackages with justStaticExecutables.
The other important thing was Docker image size does’nt get any smaller than it’s previous layer so I had to call nix-collect-garbage everytime I run any nix commands.
I could reduce from 4.5GB to 0.8GB!
Thanks a lot @domenkozar