-
Clone this repo by using:
git clone https://github.com/joundso/r-script-docker.git r-script-docker cd r-script-docker
-
Run the container (maybe you need to prefix
sudo
):docker-compose up --build
-
While the script has finished running, you should see a new plot named
plot.pdf
in./R/out/plot.pdf
. -
Stop the environment by running
docker-compose down
.
- Inspiration from this article: https://www.statworx.com/de/blog/running-your-r-script-in-docker/
- See also this gist: https://gist.github.com/mjul/f26df39649995f8b35a4874bc32c65e4