It should be totally OK to upgrade the packages.
Also I don't get that it's advised to use "apt update" when you can't do "apt upgrade". What's the point??
It should be totally OK to upgrade the packages.
Also I don't get that it's advised to use "apt update" when you can't do "apt upgrade". What's the point??
But yeah, that last part doesn't make any sense. If you're not running `apt-get upgrade`, it doesn't make sense to run `apt-get update` as nothing is using the newly fetched data anyways...
`rm -rf /var/lib/apt/lists/*` in the same RUN decreases bloat and I think possibly decreases cache misses as well.
Unlikely, you'd still have misses because of stuff like file metadata mismatches (think modification times).
If there's a security issue you need to rebuild your images anyway and optimally you have a system in place that represents images and their dependencies as some sort of dependency graph structure, so when you upgrade your base image all dependent images get rebuilt automatically.