I'm working with older Docker containers based on Ubuntu versions 16.04 and 18.04 which I rebuild periodically. I've noticed that some apt packages are becoming unavailable, leading me to compile them from source. I'm looking for the best practices to maintain these containers. Should I save the packages internally, or are there any other recommendations? Thanks in advance!
4 Answers
Have you thought about pinning the version of the Ubuntu image or the specific packages? It might help prevent them from disappearing on you. Just a heads up, if you rebuild your image, Docker will try to download all the packages again from scratch.
Just a reminder, standard support for those older versions only lasts about five years. It's something to consider when planning your maintenance.
There's no one-size-fits-all solution. You could set up your own repository to cache those packages, or consider updating your applications to work with a newer version of Ubuntu. That way you're not stuck with outdated support.
Why not just upgrade the base images? Keeping end-of-life systems can cause security and maintenance issues that are often more trouble than it's worth. It's usually better to keep everything up to date for peace of mind.

Related Questions
Can't Load PhpMyadmin On After Server Update
Redirect www to non-www in Apache Conf
How To Check If Your SSL Cert Is SHA 1
Windows TrackPad Gestures