Reducing the size of Docker images

Jérôme Petazzoni published a great article on the Ardan labs blog about reducing the size of Docker images. He compares different ways to package a binary into an image by using different base images and either dynamic or static linking. The conclusion is that although you can get really tiny images with SCRATCH, it is probably not worth it because it is more difficult to debug.

I often choose the Alpine image, because I can easily add the required libraries using apk, it’s quite small, and to debug, I can easily open a shell inside the container.

https://www.ardanlabs.com/blog/2020/02/docker-images-part1-reducing-image-size.html

Jan-Lukas Else
20 years old student who writes about everything he cares about.