Update RStudio in Docker container

I mainly run R through a Docker session. Recently. I wanted to try the latest version of RStudio with its new visual markdown editor. I am happy to say I was successful! Here are the steps:

The following steps will be done via a terminal interface. To start that:
docker exec -ti <Rocker-Image-Name> bash

  1. Download the lastest rstudio version:
    wget https://download2.rstudio.org/server/...bionic/amd64/rstudio-server-<version>.deb
  2. Stop the current rstudio server.
    • Save any open files / projects
    • suspend the current server:
      sudo rstudio-server suspend-all
    • shutdown the current server:
      sudo rstudio-server offline
  3. Remove the current rstudio server (this removes the server program … not the data).
    • sudo apt-get remove rstudio-server
    • rstudio-server online
  4. Install the new server and start
    • Install via gdebi^[If gdebi is not installed it can be installed via sudo apt-get install gdebi-core].
      sudo gdebi rstudio-server-version.deb
    • Start the server
      sudo rstudio-server online

Instructions adapted from:

Colin Chisholm RPF
Colin Chisholm RPF
Forest Manager

Interested in forests and ecology