diff --git a/opt/cs50/bin/rstudio b/opt/cs50/bin/rstudio index 84b4c3d4..bb087862 100755 --- a/opt/cs50/bin/rstudio +++ b/opt/cs50/bin/rstudio @@ -46,6 +46,9 @@ fi # Pull latest image docker pull "$IMAGE" +# Ensure preferences exist +touch "/workspaces/$RepositoryName/rstudio-prefs.json" + # Create container # https://rocker-project.org/images/versioned/rstudio.html#environment-variables docker create \ @@ -57,6 +60,7 @@ docker create \ --publish 8787:8787 \ --rm \ --volume "$LOCAL_WORKSPACE_FOLDER":"/workspaces/$RepositoryName" \ + --volume "/workspaces/$RepositoryName/rstudio-prefs.json":/home/rstudio/.config/rstudio/rstudio-prefs.json \ "$IMAGE" > /dev/null # Customize rstudio-prefs.json