From c9a77da839df0144acc3b2527382a1384425eb88 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Tue, 29 Mar 2022 15:14:41 +0200 Subject: [PATCH] Global Renvironment. PAT when installing from github. --- 04_copy_env.sh | 2 +- Dockerfile | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/04_copy_env.sh b/04_copy_env.sh index b8e0984..979eeb3 100644 --- a/04_copy_env.sh +++ b/04_copy_env.sh @@ -1,3 +1,3 @@ #!/usr/bin/with-contenv bash -printenv >> /home/$USER/.Renviron +printenv >> /etc/R/Renviron.site diff --git a/Dockerfile b/Dockerfile index 24e3f68..3425716 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,13 +28,18 @@ RUN for l in `cat /tmp/r_non_cran_pkgs.txt` ; do \ # From github ADD https://code-repo.d4science.org/gCubeSystem/r-packages-list/raw/branch/master/r_github_pkgs.txt /tmp -RUN for g in `cat /tmp/r_github_pkgs.txt` ; do \ - Rscript --slave --no-site-file --no-init-file --no-save --no-restore-history \ - -e " require(devtools); devtools::install_github('$g')" ; done +#RUN for g in `cat /tmp/r_github_pkgs.txt` ; do \ +# Rscript --slave --no-site-file --no-init-file --no-save --no-restore-history \ +# -e " require(devtools); devtools::install_github('$g')" ; done +RUN export GITHUB_PAT ; for g in `cat /tmp/r_github_pkgs.txt` ; do installGithub.r -d TRUE -u FALSE -r https://packagemanager.rstudio.com/all/__linux__/focal/latest $g ; done RUN /rocker_scripts/install_rstudio.sh RUN /rocker_scripts/install_pandoc.sh +# Remove the rstudio user's home directory and add the mountpoint for the workspace +RUN rm -fr /home/rstudio +RUN mkdir /workspace + # This part comes from https://github.com/openanalytics/shinyproxy-rstudio-ide-demo/blob/master/Dockerfile RUN echo "www-frame-origin=disabled" >> /etc/rstudio/disable_auth_rserver.conf RUN echo "www-verify-user-agent=0" >> /etc/rstudio/disable_auth_rserver.conf