ThomasKluiters / fetchy

Minuscule images made trivial
MIT License
112 stars 8 forks source link

Alternative method for small images #74

Open vishvananda opened 5 years ago

vishvananda commented 5 years ago

Hello! I just came across this project in a medium post. I just wanted to let you know about another approach for making small images: https://github.com/oracle/smith. It actually recursively copies out runtime dependencies from an existing image. It requires a little bit of manual tweaking for dynamic languages like python but it makes really small images. See for example: https://hackernoon.com/how-to-build-a-tiny-httpd-container-ae622c37db39

ThomasKluiters commented 5 years ago

Hi!

Thanks for your comment. You could submit a PR under the README to display alternatives!

Fetchy aims to make the process of making these images trivial. As smith requires a bit of setup and configuration whereas fetchy does everything for you out of the box. Fetchy therefore is currently quite greedy when it comes to building image, but will assure that the produced image is correct. This also fixes the issue of dlopen and finding binaries. Fetchy takes a reverse approach where you can slim down the container after having built the container. It does this through recursively inspecting each layer of the docker image and inspecting binary dependencies.

I do think Smith will be able to produce very small images (impressively smaller), though, fetchy also aims to make it possible to use the most recent and secure packages from debian, alpine or yum.