Skip to content

Commit dfc40fe

Browse files
Merge pull request #797 from shalberd/RStudio_make_workbench_container_proxyenv_vars_available_REnviron
RHOAIENG-16604: feat(RStudio): grab proxy-related env vars from container env context and set them in R default environment
2 parents 532f554 + 5721e3e commit dfc40fe

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

rstudio/c9s-python-3.11/run-rstudio.sh

+5-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ do
2525
done
2626
# rstudio terminal cant see environment variables set by the container runtime
2727
# (which breaks kubectl, to fix this we store the KUBERNETES_* env vars in Renviron.site)
28-
env | grep KUBERNETES_ >> /usr/lib64/R/etc/Renviron.site
28+
# Also, we store proxy-related env vars lowercased by key so RStudio projects work with proxy by default
29+
env | grep "^KUBERNETES_" >> /usr/lib64/R/etc/Renviron.site
30+
env | grep "^HTTP_PROXY=" | tr '[:upper:]' '[:lower:]' >> /usr/lib64/R/etc/Renviron.site
31+
env | grep "^HTTPS_PROXY=" | tr '[:upper:]' '[:lower:]' >> /usr/lib64/R/etc/Renviron.site
32+
env | grep "^NO_PROXY=" | tr '[:upper:]' '[:lower:]' >> /usr/lib64/R/etc/Renviron.site
2933

3034
export USER=$(whoami)
3135

0 commit comments

Comments
 (0)