CentOS base images sucks! They’re old, not updated for months!
As a professional DevOps I concern about a lot of things… but security is always close to the top of the list. With Docker build environments and deployments became much more stable, which often is a result of just being stale ;/
I’ve been talking about this for long time but it’s still hard for people to believe it. Let’s check then few, most popular images and when were they last time updated. I wrote a script for that, so feel free to check your list:
Results show that not all images are frequently updated and if we get a little bit deeper and check how many packages require upgrade:
|Image||Creation date||Age (in days)||Packages to upgrade|
Personally, I consider running
yum upgrade or
apt dist-upgrade in Dockerfile as anti-pattern - instead builds should be running so frequently to automatically pull all new upgrades from base images. That’s theory, but with images like CentOS, you have to do it or risk running your software on unpatched and potentially unsecure system. That’s why I don’t like CentOS images as a base in general, they just suck from this perspective.
There’s also another issue here - running those upgrades makes your image just bigger. Sometimes significantly bigger. That’s not what I expect from base images