Building an RStudio Singularity Container

Author

Daniel Kick

Published

May 31, 2023

Modified

May 31, 2023

Using the container

singularity exec \
  --bind run:/run \
  --bind var-lib-rstudio-server:/var/lib/rstudio-server \
  --bind database.conf:/etc/rstudio/database.conf \
  --bind home:/home \
  --bind LabProtocols:/home/rstudio/LabProtocols \
  --bind ide_settings:/home/rstudio/.config/rstudio/ \
  rstudio_4.2.sif \
  /usr/lib/rstudio-server/bin/rserver \
  --www-address=127.0.0.1 \
  --www-port=8700 \
  --server-user=rstudio
  
# note, you can also bind a folder or file by it's full path. For me on WSL this would be
# --bind /mnt/c/Users/drk8b9/Documents/LabProtocols:/home/rstudio/LabProtocols \

Login with defaults: “rstudio” and “rstudio”.