After further testing of the RStudio image behind a proxy repository, I found that the configuration I suggested in https://github.com/InseeFrLab/images-datascience/pull/64 was not ideal. In its current state, RStudio first tries to download packages from the builtin repository (https://packagemanager.rstudio.com/cran at the time of the writing), and only tries the proxy repository after this one times out.
To change this behavior, this PR suggests rewriting the whole /usr/local/lib/R/etc/R/Rprofile.site file (instead of appending to it). The line that appears to have been added in the file changes was present in the original file, which was the following for reference :
After further testing of the RStudio image behind a proxy repository, I found that the configuration I suggested in https://github.com/InseeFrLab/images-datascience/pull/64 was not ideal. In its current state, RStudio first tries to download packages from the builtin repository (https://packagemanager.rstudio.com/cran at the time of the writing), and only tries the proxy repository after this one times out.
To change this behavior, this PR suggests rewriting the whole
/usr/local/lib/R/etc/R/Rprofile.site
file (instead of appending to it). The line that appears to have been added in the file changes was present in the original file, which was the following for reference :