Skip to content
This repository has been archived by the owner on Jan 12, 2022. It is now read-only.

Commit

Permalink
Merge pull request #102 from utoronto-2i2c/tz
Browse files Browse the repository at this point in the history
Set TZ explicitly for RStudio
  • Loading branch information
GeorgianaElena authored Sep 21, 2021
2 parents e1fd790 + cbf876a commit ca14661
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion deployments/utoronto/image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -153,13 +153,19 @@ RUN apt-get update && \
apt-get install -y --no-install-recommends \
default-jdk > /dev/null && \
R CMD javareconf


# R_LIBS_USER is set by default in /etc/R/Renviron, which RStudio loads.
# We uncomment the default, and set what we wanna - so it picks up
# the packages we install. Without this, RStudio doesn't see the packages
# that R does.
# Stolen from https://github.com/jupyterhub/repo2docker/blob/6a07a48b2df48168685bb0f993d2a12bd86e23bf/repo2docker/buildpacks/r.py
# To try fight https://community.rstudio.com/t/timedatectl-had-status-1/72060/5 ,
# which shows up sometimes when trying to install packages that want the TZ
# timedatectl expects systemd running, which isn't true in our containers
RUN sed -i -e '/^R_LIBS_USER=/s/^/#/' /etc/R/Renviron && \
echo "R_LIBS_USER=${R_LIBS_USER}" >> /etc/R/Renviron
echo "R_LIBS_USER=${R_LIBS_USER}" >> /etc/R/Renviron && \
echo "TZ=${TZ}" >> /etc/R/Renviron

USER ${NB_USER}

Expand Down

0 comments on commit ca14661

Please sign in to comment.