Fix the R_HOME path.

This commit is contained in:
Andrea Dell'Amico 2023-03-20 13:54:23 +01:00
parent 005ff6baf2
commit 8bef87da71
Signed by: andrea.dellamico
GPG Key ID: 147ABE6CEB9E20FF
1 changed files with 6 additions and 6 deletions

View File

@ -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