Create a Dockerfile from a DESCRIPTION

dock_from_desc(
  path = "DESCRIPTION",
  FROM = paste0("rocker/r-ver:", R.Version()$major, ".", R.Version()$minor),
  AS = NULL,
  sysreqs = TRUE,
  repos = c(CRAN = "https://cran.rstudio.com/"),
  expand = FALSE,
  update_tar_gz = TRUE,
  build_from_source = TRUE,
  extra_sysreqs = NULL
)

Arguments

path

path to the DESCRIPTION file to use as an input.

FROM

The FROM of the Dockerfile. Default is FROM rocker/r-ver:`R.Version()$major`.`R.Version()$minor`.

AS

The AS of the Dockerfile. Default it NULL.

sysreqs

boolean. If TRUE, the Dockerfile will contain sysreq installation.

repos

character. The URL(s) of the repositories to use for `options("repos")`.

expand

boolean. If `TRUE` each system requirement will have its own `RUN` line.

update_tar_gz

boolean. If `TRUE` and `build_from_source` is also `TRUE`, an updated tar.gz is created.

build_from_source

boolean. If `TRUE` no tar.gz is created and the Dockerfile directly mount the source folder.

extra_sysreqs

character vector. Extra debian system requirements. Will be installed with apt-get install.