Tutorial for docker + Rstudio?
I just started using the Community-maintained Rstudio environment. I am under the impression that this Rstudio environment is within a docker image that gets spun up each time I unpause my cloud environment. Also, that the R packages I add to this workspace will stay installed so long as my cloud environment permanent disk is attached.
Is it possible to save and update a docker image with the added R packages? Is it possible to start up Rstudio from such an updated docker image rather than starting up from the community-maintained Rstudio environment? If so, is there a tutorial somewhere in the Terra documentation? So far I've found documentation about juptyer + docker (https://support.terra.bio/hc/en-us/articles/360037143432-Docker-tutorial-Custom-cloud-environments-for-Jupyter-notebooks) but not Rstudio + docker.
If it’s not currently possible that’s helpful for me to know.
My use case is that I would like to share a docker image via a docker registry with a collaborator who could then have access to the exact same Rstudio environment + all of the specific package versions I’ve installed when they start to use Terra.
Thanks!
Katie
Comments
1 comment
Hi Katie,
Thanks for reaching out. We do not currently have a tutorial for creating a custom docker image for R-studio, however, it is possible. Like with using a docker image for Jupyter notebooks you will want to extend your custom docker image from our base image, for R-studio those can be found here: https://github.com/anvilproject/anvil-docker/tree/master/anvil-rstudio-bioconductor
You could create a startup script for allowing your collaborator to run on the same Rstudio environment, instruction for that can be found here: Using a startup script to launch a pre-configured cloud environment. Both options work equally well, it just comes down to preference.
If you have any other questions please let us know.
Kind regards,
Emil
Please sign in to leave a comment.