kas-container: pass http_proxy et.al through sudo

If used in a podman environment, it's important to pass the http proxy
information down through sudo. This does not happen by default. We also
want to pass the entire environment down to avoid missing any other
environment variable.

Signed-off-by: Tobias Schmidl <tobiasschmidl@siemens.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This commit is contained in:
Schmidl, Tobias 2022-02-02 21:10:29 +01:00 committed by Jan Kiszka
parent 94641a7b72
commit 87ce7f90d6

View File

@ -97,7 +97,7 @@ enable_isar_mode() {
if [ "${KAS_CONTAINER_ENGINE}" = "podman" ]; then
# sudo is needed for a privileged podman container
KAS_CONTAINER_COMMAND="sudo ${KAS_CONTAINER_COMMAND}"
KAS_CONTAINER_COMMAND="sudo --preserve-env ${KAS_CONTAINER_COMMAND}"
fi
}