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 inside this Dockerfile.
conda install conda-forge::r-dockerfiler
conda install conda-forge/label/cf202003::r-dockerfiler