A minimal docker image for knitting R Markdown documents. I use this image as the base for the Dockerfiles in my reproducible research projects.
Includes:
- base R (uses rocker/r-ver)
- pandoc
- rmarkdown and dependencies
- tinytex
# latest R version
docker build . -t rmarkdown-tinytex --build-arg R=latest
# specific R version
docker build . -t rmarkdown-tinytex --build-arg R=4.0.2
cd # to wherever this folder is
docker run --rm -v $PWD:/home -w /home csdaw/rmarkdown-tinytex \
Rscript -e 'rmarkdown::render("test.Rmd")'
cd # to wherever this folder is
docker run --rm -it -v $PWD:/home -w /home csdaw/rmarkdown-tinytex R
rmarkdown::render("test.Rmd")