Pattern: Use of apt-get upgrade
or dist-upgrade
Issue: -
You should avoid RUN apt-get upgrade
or dist-upgrade
, as many of the “essential” packages from the parent images won’t upgrade inside an unprivileged container. If a package contained in the parent image is out-of-date, you should contact its maintainers.
Example of incorrect code:
RUN apt-get update && apt-get upgrade
Example of correct code:
RUN apt-get update