-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Labels
bugSomething isn't workingSomething isn't working
Description
The default FROM argument is rocker/r-base which is a debian image. Using the distro arg helps find the appropriate system dependencies. the FROM argument will always be rocker/r-base for all distro values.
For example a simple renv.lock file with the following call
dock <- dockerfiler::dock_from_renv(distro = "centos8")
dock$write()Generated this dockerfile
FROM rocker/r-base:4.3.0
RUN yum update -y && dnf install -y libcurl-devel
RUN dnf install -y openssl-devel
# ......truncated for brevity.....
RUN mkdir -p /usr/local/lib/R/etc/ /usr/lib/R/etc/
RUN echo "options(renv.config.pak.enabled = TRUE, repos = c(CRAN = 'https://cran.rstudio.com/'), download.file.method = 'libcurl', Ncpus = 4)" | tee /usr/local/lib/R/etc/Rprofile.site | tee /usr/lib/R/etc/Rprofile.site
RUN R -e 'install.packages(c("renv","remotes"))'
COPY renv.lock renv.lock
RUN R -e 'renv::restore()'If pak is to be used for identifying system dependencies, I believe the FROM argument should be removed and the FROM statement derived from the distro argument so that the base image and the system dep commands are in agreement.
dockerfiler/R/dock_from_renv.R
Line 50 in e40f804
| FROM = "rocker/r-base", |
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working