Building the book "Statistical Rethinking" by Solomon Kurtz in Docker

13 July 2020
 GitHub  Pages

kurtz-rethinking bookdown

This book was written by Solomon Kurtz which code lives here. It is a beautiful book on Bayesian regression in R using the brms package. Based on the book “Statistical Rethinking” by Richard McElreath, a Bayesian Course with examples in R and Stan.

Bookdown details

  • Book version 1.0.1. See index.Rmd.
  • R-3.6.3
  • RStudio 1.2.5042
  • Most packages MRAN dated on 2019-06-12. Other packages dated at later dates for smnoother book building.

Build and run

Build container

Build with:

docker build  -f Dockerfile -t f0nzie/kurtz-rethinking .

Run container

docker run --rm -p 28787:8787 -v /home/msfz751/docker-share/kurtz:/home/rstudio/share  -e USERID=$UID -e PASSWORD=kurtz f0nzie/kurtz-rethinking

Then open RStudio in your browser with 127.0.0.1:28787, with rstudio and kurtz user id and password.

Note. We will replace this a script that also shares the book folder. See below.

Build book

Rscript -e 'bookdown::render_book(input = "index.Rmd", output_format = "bookdown::gitbook", output_dir = "public", clean_envir = FALSE)'

« Building the book dataviz-wilke with Docker | Debugging rTorch with Docker and Travis »