This is a container that runs R... not any of the R IDEs.
- Make sure you're on a system running X.
- Disable X access control (don't do this on a public-facing machine):
$ xhost +
$ cd
to a path where you want to do some R.$ docker run --rm -it -v /tmp/.X11-unix:/tmp/.X11-unix -v `pwd`:`pwd` -e DISPLAY=$DISPLAY -e RWORK=`pwd` hackenfreude/r-3.3.1
- You'll end up on the R command line. Do some R. If you tell it to plot something, you'll see the plot come up on your screen.
> q()
will quit R and kill the container. Any files you created will be on the path of the host where you started.- Reenable X access control:
$ xhost -
- Docker mounted the host's X socket in the continer as the container's X socket; this allows the container's GUI to pass back up to the host. This is only relevant if you plot something.
- Docker mounted the host's working directory in the container at the same path.
- Rprofile.site tells R set its working directory to the RWORK environment variable. Part of the
docker run
command above setsRWORK
in the container as the host's working directory.
Open an issue.