Launch RStudio from Docker container terminal in browser


I have no problems running a RStudio Docker image and working with RStudio in the browser, e.g.:
docker run --rm -it -e PASSWORD=password -p 8787:8787 -v ${PWD}:/home/rstudio rocker/tidyverse

I like to be able to explore my Docker, so I run the container entering bash, like so:
docker run --rm -it -e PASSWORD=password -p 8787:8787 -v ${PWD}:/home/rstudio rocker/tidyverse /bin/bash

This works, I get bash:

Question is: from this point, while in bash, how (if at all) can I launch RStudio in the browser (e.g. with http://localhost:8787/, without (my current solution) exiting the container and running again without bash?

rocker/tidyverse inherits from rocker/rstudio and it's dockerfile ( shows that final directive is RUN /init. I tried running your commands and running /init from inside a container seems to start RStudio Server.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.