mirror of https://github.com/docker/cli.git
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:
parent
c59773f155
commit
7227c0145d
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue