We had an application interruption in production during a deployment because a load balancer package in our top-level Docker file had the latest version that happened to have a new API. Our app broke down at a time when most of our developers weren't in the office, and I and another developer had to crawl into the night to fix the bug. Since our newest build included many new features, it took us a few hours to determine that there was a version change in the Docker file that resulted in the entire application being corrupted.
Since we use CI / CD practices, I thought it would be a good idea to hard-code the version of this package in the Docker file because it is such a high-level component of the application. What I did.
My reasoning is that in the future, when the staff are "on deck" and available to fix problems, we can update the top-level packages in our Docker file (there aren't many of them) and carefully by version looking for that don't work the app.
Is this considered good or bad practice? Why?