This repo is an example of how to create an ubuntu-based docker image of RStudio, which also includes the installation of several (optional) R packages recommended by RStudio.
jgbradley1/rstudio-docker
A short example on how to create an Ubuntu-based rstudio docker image
Dockerfile