Working with Renv and Docker presents some challenges. Here are the key problems and solutions I am currently using:
Incomplete Package Installation: Not all required packages are installed during renv::restore(). For instance, renv::install('markdown') needs manual execution, despite being listed in renv.lock.
Snapshot Limitations: The command renv::snapshot(type = 'explicit') fails to include all packages specified in the Description file.
Extended Cache Traversal Time: Occasionally, Renv takes over 30 minutes to traverse the cache directory, significantly slowing down the build process. Normally, Docker builds take about 5 minutes when packages are cached. A workaround involves creating a new renv.lock file using renv::snapshot(type = 'explicit') and manually installing the missing packages.
For later release stage, I would recommend understanding this problem and maybe replacing the docker base by a more adequate one.
Working with Renv and Docker presents some challenges. Here are the key problems and solutions I am currently using:
For later release stage, I would recommend understanding this problem and maybe replacing the docker base by a more adequate one.