From cc47dbd7d84a86ebfad3bd4cd8d73047d60e2f71 Mon Sep 17 00:00:00 2001 From: Ayaz Salikhov Date: Fri, 25 Aug 2023 13:47:52 +0400 Subject: [PATCH] Preserve LD_LIBRARY_PATH in start.sh (#1981) --- images/docker-stacks-foundation/start.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/images/docker-stacks-foundation/start.sh b/images/docker-stacks-foundation/start.sh index 1a559dbc4e..7c5eb93907 100755 --- a/images/docker-stacks-foundation/start.sh +++ b/images/docker-stacks-foundation/start.sh @@ -140,6 +140,7 @@ if [ "$(id -u)" == 0 ] ; then unset_explicit_env_vars _log "Running as ${NB_USER}:" "${cmd[@]}" exec sudo --preserve-env --set-home --user "${NB_USER}" \ + LD_LIBRARY_PATH="${LD_LIBRARY_PATH}" \ PATH="${PATH}" \ PYTHONPATH="${PYTHONPATH:-}" \ "${cmd[@]}" @@ -165,7 +166,7 @@ if [ "$(id -u)" == 0 ] ; then # used `env_delete` from /etc/sudoers. It has higher priority than the # `--preserve-env` flag and the `env_keep` configuration. # - # - We preserve PATH and PYTHONPATH explicitly. Note however that sudo + # - We preserve LD_LIBRARY_PATH, PATH and PYTHONPATH explicitly. Note however that sudo # resolves `${cmd[@]}` using the "secure_path" variable we modified # above in /etc/sudoers.d/path. Thus PATH is irrelevant to how the above # sudo command resolves the path of `${cmd[@]}`. The PATH will be relevant