Merge pull request #3680 from muru/patch-1

docs: fix misleading example of setting an env variable for a single command
This commit is contained in:
Sebastiaan van Stijn
2022-06-21 10:36:11 +02:00
committed by GitHub

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