3 ms·
I'm interested to know your alternate solution. How would you recommend getting the required libraries into your image?
by astrea 6y ago
I'm interested to know your alternate solution. How would you recommend getting the required libraries into your image?
- GordonS 6y agoI guess the OP meant such that apt/yum/dnf/whatever runs every time the image runs, rather than just once when it's built. Not that that's something I see very often, mind.
- corytheboyd 6y agoIsn’t the standard approach here then to derive from base images, which have exact versions? Being honest, I’m not a Docker/VM legend but I’ve seen a few attempts at managing this, and base images was one of them. Personally, I don’t see the issue with it if you’re at least being a little careful— don’t make obvious mistakes like installing latest/nightly packages automatically, etc.
- GordonS 6y agoYes, that's the standard approach, but the base images are frequently updated. If you really want to pin at a specific image, you need to specify the image hash, rather than using the "latest", or even a version tag (e.g. "2.1"). In your image that extends from the base image, you'll typically update the package repo cache (it is typically cleared after building the base image, to reduce the size), then install whatever packages you want. Like you, I don't see a particular issue with updating system-level packages - especially from a security standpoint.