3 ms·
> Yes, today most people who use Docker build containers with unnecessary distro bits in them. >... to move away from a heavyweight distro like fedora or ubunt
by kylequest 11y ago
> Yes, today most people who use Docker build containers with unnecessary distro bits in them.
>... to move away from a heavyweight distro like fedora or ubuntu, to something like alpine or even more minimalistic.
The distro package management is one of the biggest reasons why people still stick with heavyweight distros like Ubuntu.
This is why DockerSlim [1] was created (at one of the Docker hack days, by the way :-)) It lets you use heavyweight distros as-is eliminating everything you don't need. You get the best of both worlds where you don't have to change your process and you still get small images (7, 10, 20 and even 30 times smaller than the original).
[1] - http://dockersl.im http://dockersl.im
P.S.
It is safe for use in production :)
- jtblin 11y agoThere's a packer manager in alpine. Maybe not as complete as ubuntu but pretty decent imho.
- kylequest 11y agoYes, it does have a package manager, but... , like you said, it's not as complete and it is different, which means you need to put in extra efforts to convert and make things work (also don't forget about a potential lib C compatibility fun). Why go through all this trouble though? Why not use the distro you are already using as-is and still get Alpine-like image sizes? One nice thing about Alpine is its hardened kernel, but you won't be using it in your Docker container. Alpine is nice, but it's not worth it when there are other alternatives that don't require extra time and effort I'd rather use to build a better product. And if you are using 3rd party Docker images Alpine won't help :)
- hamburglar 11y agoHas something like nix been considered for alpine? I think it would be really great for use in containers since it has the built in ability to garbage collect unused dependencies.
- rdicosmo 11y agoThat's great work, you may also look at https://github.com/rdicosmo/ami-thinner https://github.com/rdicosmo/ami-thinner which is described in http://www.dicosmo.org/MyOpinions/index.php?post/2013/02/08/131-optimising-the-disk-footprint-of-gnu-linux-distributions http://www.dicosmo.org/MyOpinions/index.php?post/2013/02/08/...