fix: preserve global flags when sudo is sudo-rs
`sudo-rs`, the default sudo on Ubuntu 25.10 and later, does not support preserving the entire environment, so `--quiet`, `--trace`, `--force` and `--app` stopped taking effect once `dokku` re-executed itself as the `dokku` user, and a warning was printed on every invocation. Variables outside the set dokku forwards no longer cross that boundary and can be named in `DOKKU_PRESERVE_ENV` instead.
This commit is contained in:
14 files changed
+403
-10
No files matched your search
@@ -135,3 +135,9 @@ Use `visudo /etc/sudoers.d/dokku-users`, or `visudo /etc/sudoers` to add the fol
|
||||
```
|
||||
%dokku ALL=(ALL:ALL) NOPASSWD:SETENV: /usr/bin/dokku
|
||||
```
|
||||
|
||||
The `SETENV:` tag is required. When a user other than `dokku` runs the `dokku` binary, it re-executes
|
||||
itself as the `dokku` user and names the environment variables that have to survive that step via
|
||||
`sudo --preserve-env=`. Without `SETENV:` those variables are filtered out, and global flags such as
|
||||
`--quiet`, `--trace` and `--force` stop taking effect. See
|
||||
[Forwarding environment variables](/docs/configuration/environment-variables.md#forwarding-environment-variables).
|
||||
Reference in new issue
Block a user