Skip to content

Latest commit

 

History

History
48 lines (35 loc) · 1.58 KB

README.md

File metadata and controls

48 lines (35 loc) · 1.58 KB

rmarkdown-tinytex

pulls image dockerfile base license

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

Build image

# 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

Run container and knit test document automatically

cd # to wherever this folder is
docker run --rm -v $PWD:/home -w /home csdaw/rmarkdown-tinytex \
  Rscript -e 'rmarkdown::render("test.Rmd")'

Run container and knit test document interactively

cd # to wherever this folder is
docker run --rm -it -v $PWD:/home -w /home csdaw/rmarkdown-tinytex R
rmarkdown::render("test.Rmd")