Strip feature in #EDIB (Elixir Docker Image Builder) makes images even smaller!
edib-tool 1.3.0 now includes a tiny but awesome tool which helps to minimize the image size even further: ExStripZip.
With mix-edib v0.7.0 you can utilize it pretty easily:
$ mix edib --strip
and your images will become up to 40 - 45 % smaller. (If you can squeeze out more, tell me about your success.)
Chris’ Phoenix Chat Example App (with Ecto stuff removed):
The lower barrier is around 10 MB (empty app without any hex dependencies) for stripped releases (unstripped: ~ 18 MB).
Furthermore there is also the option –zip
, but you should use it only if you know that there are no NIFs in your app or its dependencies. (The savings of this compression are pretty small and not really worth the effort, as docker images are compressed anyway.)
Happy (tiny) image building!
Read next Fluxter v0.3.1—an InfluxDB writer for Elixir—has been released