Alpine Linux : A Tiny Tiny Docker Image
Do you know Alpine Linux ? It’s a Tiny Linux distribution based on busybox.
Every one working with docker now that it takes a lot of disk space. That’s why here at ERDF Lyon we are using Docker-Alpine to build our own services..
It is very cool to have a very small containers, for example the base image is only 5 Mb, comparatively to a debian base docker or a centos it’s amazing !!
Here is a list of some images builds by our team :
[root@XXXXX ~]# docker images REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE library/alpine-java latest b1ac8a415cc2 8 minutes ago 167 MB library/alpine-nginx-php latest 04dd1dd5f3a8 36 minutes ago 73.07 MB library/alpine-adaje-nginx latest babdce2f7acb 2 hours ago 22.34 MB library/alpine-influxdb latest 8c1c8602ab3d 5 hours ago 43.71 MB library/alpine-grafana latest 87e008359f09 7 hours ago 105 MB alpine-libc latest 768e1a26255d 8 hours ago 14.01 MB alpine latest 809d1eb48c44 9 weeks ago 5.244 MB library/centos6 latest 5af3557457ba 5 months ago 396.1 MB
as you can see the base alpine is only 5.2MB, an Alpine image with nginx is only 43 MB and even an image with the full java runtime pre-installed is 167MB.
Against a centos6 base (with nothing on it) that takes nearly 400MB : y’a pas photo !!
We already have our own docker registry so we just have to build and push a lot of new images base on this tiny Docker image..
Here what’s in the pipeline :
- alpine-apache (already build from a centos)
- alpine-jenkins (already build from a centos)
- alpine-python (already build from a centos)
- alpine-ansible (already build from a centos)