From 1f79790023bd382f6ecf5efde4022b0b597ace42 Mon Sep 17 00:00:00 2001 From: shalberd <21118431+shalberd@users.noreply.github.com> Date: Thu, 5 Dec 2024 16:46:50 +0100 Subject: [PATCH] py 311 added grabbing proxy-related env vars from container context and setting them in R Signed-off-by: shalberd <21118431+shalberd@users.noreply.github.com> --- rstudio/c9s-python-3.11/run-rstudio.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rstudio/c9s-python-3.11/run-rstudio.sh b/rstudio/c9s-python-3.11/run-rstudio.sh index d9f04ddc7..49ed5f611 100755 --- a/rstudio/c9s-python-3.11/run-rstudio.sh +++ b/rstudio/c9s-python-3.11/run-rstudio.sh @@ -24,8 +24,12 @@ do fi done # rstudio terminal cant see environment variables set by the container runtime -# (which breaks kubectl, to fix this we store the KUBERNETES_* env vars in Renviron.site) +# (which breaks kubectl, to fix this we store the KUBERNETES_* and proxy_related env vars in Renviron.site) +# proxy_related env vars need to be lowercase by key to work in RStudio env | grep KUBERNETES_ >> /usr/lib64/R/etc/Renviron.site +env | grep HTTP_PROXY | tr '[:upper:]' '[:lower:]' >> /usr/lib64/R/etc/Renviron.site +env | grep HTTPS_PROXY | tr '[:upper:]' '[:lower:]' >> /usr/lib64/R/etc/Renviron.site +env | grep NO_PROXY | tr '[:upper:]' '[:lower:]' >> /usr/lib64/R/etc/Renviron.site export USER=$(whoami)