mirror of https://github.com/docker/docs.git
fix get-docker invocation with DRY_RUN
sudo does not pass its env to command, so the current invocation is not a dry run, as DRY_RUN never gets passed to sh: ``` $ DRY_RUN=1 sudo env | grep -c DRY 0 ``` It does accept env variables before the command, like so: ``` $ sudo DRY_RUN=1 sh ./get-docker.sh ``` but those are subject to restrictions imposed by the security policy plugin, so it's better to just use the script argument instead.
This commit is contained in:
parent
3affff66e4
commit
a7acc89188
|
@ -34,12 +34,12 @@ of the convenience script:
|
|||
|
||||
> Tip: preview script steps before running
|
||||
>
|
||||
> You can run the script with the `DRY_RUN=1` option to learn what steps the
|
||||
> You can run the script with the `--dry-run` option to learn what steps the
|
||||
> script will run when invoked:
|
||||
>
|
||||
> ```console
|
||||
> $ curl -fsSL https://get.docker.com -o get-docker.sh
|
||||
> $ DRY_RUN=1 sudo sh ./get-docker.sh
|
||||
> $ sudo sh ./get-docker.sh --dry-run
|
||||
> ```
|
||||
|
||||
This example downloads the script from
|
||||
|
|
Loading…
Reference in New Issue