docs: fix misleading example of setting an env variable for a single command

The `DEBIAN_FRONTEND` environment variable is used to control the interface by which debconf questions are presented to the user (see [`man 7 debconf`][1]). In `DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y`, the `DEBIAN_FRONTEND` environment variable is only set for the `apt-get update` command which does not ask debconf questions, and will not affect the `apt-get install` command where these questions are actually asked. It should be the other way around.

  [1]: https://manpages.debian.org/debconf.7.html

Signed-off-by: Murukesh Mohanan <murukesh.mohanan@gmail.com>
This commit is contained in:
Murukesh Mohanan 2022-06-20 18:33:57 +09:00
parent c59773f155
commit 7227c0145d
No known key found for this signature in database
GPG Key ID: FA2344AC332ED6B4
1 changed files with 1 additions and 1 deletions

View File

@ -1060,7 +1060,7 @@ If an environment variable is only needed during build, and not in the final
image, consider setting a value for a single command instead: image, consider setting a value for a single command instead:
```dockerfile ```dockerfile
RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y ... RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y ...
``` ```
Or using [`ARG`](#arg), which is not persisted in the final image: Or using [`ARG`](#arg), which is not persisted in the final image: