Create a dockerfile from a DESCRIPTION file
Source: R/dockitect-from-environment.R
dk_from_description.RdGenerates a `dockerfile“ based on a package DESCRIPTION file, ensuring all package dependencies are installed in the container.
Usage
dk_from_description(
description_file = "DESCRIPTION",
r_version = NULL,
base_image = NULL,
include_sysreqs = TRUE
)Details
This function:
Extracts the R version from the DESCRIPTION's
Dependsfield (if available)Uses the appropriate
rocker/r-verbase imageExtracts package dependencies from
Depends,Imports, andSuggestsfieldsAdds system requirements for those packages
Sets up the package installation
The resulting dockerfile will install all the dependencies required by
your package and then install the package itself from the source.
See also
dk_from_session() for creating from the current session,
dk_from_renv() for creating from renv.lock files, &
dk_add_sysreqs() for adding system requirements
Other dockerfile from environment functions:
dk_from_renv(),
dk_from_script(),
dk_from_session()