If you're using a tag like centos:8 that gets updated periodically, you already do not have reproducible builds. This just ensures you get updated packages as soon as possible
Re:Dockerfile Security Best Practices
by BossingAround on Thursday October 15, 2020 @03:22PM
(#24792698)
If you're using a tag like centos:8, I agree. That's why it's not a good practice to use centos:8 as your base image.
Re:Dockerfile Security Best Practices
by itamarst on Wednesday October 14, 2020 @02:06PM
(#24779607)
It's a tradeoff, yes. You can do more work to rebuild a base image, or you can say "technically have slightly newer version of glibc isn't reproducible but in practice I don't expect that to break anything so I'll live with the risk".
Generally, if you want to update system packages, rebuild the container make it the new base for you. Updating with every build provides a potentially non-reproducible build.