From 8bef87da71080d07914f4679d77e0c6a8e5ffdbf Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Mon, 20 Mar 2023 13:54:23 +0100 Subject: [PATCH] Fix the R_HOME path. --- Dockerfile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 58120f8..9e15bfd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,6 +18,7 @@ ENV GROUPID="100" ENV PANDOC_VERSION=default ENV PATH=/usr/lib/rstudio-server/bin:$PATH ENV DEBIAN_FRONTEND=noninteractive +ENV R_HOME=/usr/local/lib/R # Configure environment ENV SHELL=/bin/bash \ NB_USER="${NB_USER}" \ @@ -39,11 +40,10 @@ RUN /rocker_scripts/install_rstudio.sh RUN echo "www-frame-origin=same" >> /etc/rstudio/disable_auth_rserver.conf RUN echo "www-verify-user-agent=0" >> /etc/rstudio/disable_auth_rserver.conf -ARG EXCLUDE_VARS="HOME PASSWORD RSTUDIO_VERSION BATCH_USER_CREATION" -ARG R_HOME="/usr/local" -# The 0*_ scripts cannot be used anymore -# ADD 01_set_env.sh /etc/cont-init.d/01_set_env -RUN for file in /var/run/s6/container_environment/* ; do sed -i "/^${file##*/}=/d" ${R_HOME}/etc/Renviron.site ; regex="(^| )${file##*/}($| )" ; [[ $exclude_vars =~ $regex ]] && echo "${file##*/}=$(cat $file)" >> ${R_HOME}/etc/Renviron.site ; done +# The 0*_ scripts cannot be used anymore at startup time + +RUN chmod a+rx 01_set_env.sh +RUN ./01_set_env.sh # ADD 02_userconf.sh /etc/cont-init.d/02_userconf RUN mv -f /etc/rstudio/disable_auth_rserver.conf /etc/rstudio/rserver.conf @@ -66,7 +66,7 @@ RUN #echo "allow-terminal-websockets=1" >> /etc/rstudio/rsession.conf RUN echo "limit-cpu-time-minutes=0" >> /etc/rstudio/rsession.conf RUN echo "limit-file-upload-size-mb=0" >> /etc/rstudio/rsession.conf RUN #echo "limit-xfs-disk-quota=no" >> /etc/rstudio/rsession.conf -RUN curl -o /etc/R/Rprofile.site "https://code-repo.d4science.org/gCubeSystem/rstudio-rprofile/raw/branch/master/jupyter-Rprofile.site" +RUN curl -o "${R_HOME}/etc/R/Rprofile.site" "https://code-repo.d4science.org/gCubeSystem/rstudio-rprofile/raw/branch/master/jupyter-Rprofile.site" # Copy a script that we will use to correct permissions after running certain commands COPY fix-permissions /usr/local/bin/fix-permissions