Jan-Lukas Else

Thoughts of an IT expert

Reducing the size of Docker images

Published on in 🔗 Links
Updated on
Short link: https://b.jlel.se/s/18d
⚠️ This entry is already over one year old. It may no longer be up to date. Opinions may have changed.

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

Tags:

Jan-Lukas Else
Interactions & Comments