Skip to content

Commit 0c8ce43

Browse files
muruthaJeztah
authored andcommitted
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 <[email protected]> (cherry picked from commit 7227c01) Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent 0b421dc commit 0c8ce43

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/reference/builder.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1060,7 +1060,7 @@ If an environment variable is only needed during build, and not in the final
10601060
image, consider setting a value for a single command instead:
10611061
10621062
```dockerfile
1063-
RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y ...
1063+
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y ...
10641064
```
10651065
10661066
Or using [`ARG`](#arg), which is not persisted in the final image:

0 commit comments

Comments
 (0)