Skip to content

Commit

Permalink
docs: fix misleading example of setting an env variable for a single …
Browse files Browse the repository at this point in the history
…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>
(cherry picked from commit 7227c01)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
  • Loading branch information
muru authored and thaJeztah committed Dec 15, 2022
1 parent 0b421dc commit 0c8ce43
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/reference/builder.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

```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:
Expand Down

0 comments on commit 0c8ce43

Please sign in to comment.