I had a play with the excellent Alpine Linux over the weekend. Alpine describes itself as;
Alpine Linux is a security-oriented, lightweight Linux distribution based on musl libc and busybox.
And by lightweight they really do mean lightweight, with an 8MB container size and a 130MB bare metal installation it is tiny. Because of this I decided to use it as the new base images for my Docker Images as some of them were getting a little bloated. As you can see from the table below, the difference in the final image size is staggering …
- ImageName / Before / After
- Base / 244MB / 13MB
- NGINX-PHP / 446MB / 76MB
- MariaDB / 432MB / 189MB
- AB / 261MB / 14MB
… even though I have stated before I am quite a snob when it comes to which Operating System I run I think Apline has definitely changed my mind.
So far I have managed to install everything I need from their package repo with very little in the way of changes to my original CentOS 7 image configuration. Very impressive stuff.
You can find my images on the Docker Hub or the source on GitHub .