View source: R/write_dockerfileR.R
write_dockerfileR | R Documentation |
sessioninfo::package_info()
into the contents of a DockerfileConvert the output from sessioninfo::package_info()
into the contents of a Dockerfile
write_dockerfileR( write_file = TRUE, org = "rocker", image = "r-base:latest", apt_packages = TRUE, dir = "./", filename = "Dockerfile" )
write_file |
Defaults to TRUE, which will write a dockerfile. Else, output will be written to console (or whatever connection is open). console (or whatever connection you have open). The dockerfile's name will combine the dir and filename parameterss: by default, './Dockerfile'. Writing a file will overwrite any Dockerfile in the same location. 'TRUE' is probably appropriate for exporting to a tool like mybinder.org; 'FALSE ' is appropriate if you already have a Dockerfile and you prefer to paste sections from this function into it. |
org |
Defaults to Rocker (https://www.rocker-project.org/); another option is Docker's official R images (https://hub.docker.com/_/r-base). For more on Rocker, see https://arxiv.org/abs/1710.03675. |
image |
Defaults to r-base:latest, whose source code is on Rocker's GitHub: https://github.com/rocker-org/rocker/blob/master/r-base/latest/Dockerfile. available tags for r-base are listed here: https://hub.docker.com/r/rocker/r-base/tags. |
apt_packages |
should standard needed apt packages be installed? Defaults to true and installs libcurl4-openssl-dev, libssl-dev, and libxml2-dev. Other Rocker images can be browsed here: https://hub.docker.com/u/rocker. |
dir |
Defaults to current directory, './'. |
filename |
Defaults to 'Dockerfile', making the composite file './Dockerfile'. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.