https://cran.ma.imperial.ac.uk/web/packages/dockerfiler/index.html
CRAN: Package dockerfiler
Build a Dockerfile straight from your R session. 'dockerfiler' allows you to create step by step a Dockerfile, and provide convenient tools to wrap R code...
cranpackage