Skip to content

Commit

Permalink
Merge pull request #12571 from itamarst/patch-1
Browse files Browse the repository at this point in the history
Stop telling people not to install security updates
  • Loading branch information
usha-mandya authored Mar 25, 2021
2 parents 0c87bc8 + bce3cbf commit d0db4af
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions develop/develop-images/dockerfile_best-practices.md
Original file line number Diff line number Diff line change
Expand Up @@ -469,13 +469,6 @@ Probably the most common use-case for `RUN` is an application of `apt-get`.
Because it installs packages, the `RUN apt-get` command has several gotchas to
look out for.

Avoid `RUN apt-get upgrade` and `dist-upgrade`, as many of the "essential"
packages from the parent images cannot upgrade inside an
[unprivileged container](../../engine/reference/run.md#security-configuration). If a package
contained in the parent image is out-of-date, contact its maintainers. If you
know there is a particular package, `foo`, that needs to be updated, use
`apt-get install -y foo` to update automatically.

Always combine `RUN apt-get update` with `apt-get install` in the same `RUN`
statement. For example:

Expand Down

0 comments on commit d0db4af

Please sign in to comment.