1 Quick reference
- Source repository: rocker-org/rocker-versioned2
- Dockerfile
- tags
- Published image details: rocker-org/rocker-versioned2’s wiki
- Non-root default user:
rstudio
2 Overview
This image is based on rocker/geospatial
and configured to run RStudio Server on Binder, thanks to jupyter-rsession-proxy
.
For instructions on how to use this image with Binder for your project, see the rocker-org/binder, a template repository.
By placing the following badge in README.md
of your project, RStudio can be started and used in the browser by simply clicking on the badge.
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/<GITHUB_USER>/<REPO>/<BRANCH>?urlpath=rstudio)
You can also make a Binder badge with usethis::use_binder_badge()
R function.
3 How to use
3.1 Use outside of Binder
If you use this image with Docker, the default command runs Jupyter Notebook. Since the Jupyter Notebook port is set to 8888
, you can open the Jupyter Notebook screen on localhost:8888
from your browser with the following command.
docker run --rm -ti -p 8888:8888 rocker/binder
Or, start JupyterLab instead of Jupyter Notebook like this.
docker run --rm -ti -p 8888:8888 rocker/binder sh -c "jupyter lab --ip 0.0.0.0 --no-browser"
You can log in by entering the token displayed in the terminal as your password.
If you want to set your own password for Jupyter, you can set it as a environment variable JUPYTER_TOKEN
1.
docker run --rm -ti -e JUPYTER_TOKEN=yourpassword -p 8888:8888 rocker/binder
To run RStudio Server directly as in rocker/rstudio
, execute /init
command with the root user specified.
docker run --rm -ti -p 8787:8787 --user root rocker/binder /init