I'm using renv to manage the specific versions of packages supporting production R code, which is built into rocker-based docker images that are ultimately deployed. In my build logs, I see our initial
install2.R --deps=TRUE remotes calls that happen before full package restoration hits the Rstudio Package Manager URL and install binaries super fast. But later calls to restore the exact versions of libraries needed via
renv::restore() downloads source from CRAN, which is super slow.
renv.lock file references CRAN as the repository, which is how my local dev environments are setup. I'd like not to have devs switch from CRAN to RPSM for daily dev work, as that introduces some friction with new package versions, etc. Is it possible to set local dev environments to use CRAN for normal work and locking library versions, but have docker prefer RSPM when restoring renv environments? Looking over https://github.com/rstudio/renv/issues/430, I suspect this just isn't possible right now, but given that guides exist for using renv with Docker, I'm hoping I'm just misreading/mis-understanding how renv works.
Thanks in advance!