ThinkR-open / dockerfiler

Easy Dockerfile Creation from R
https://thinkr-open.github.io/dockerfiler/
Other
177 stars 27 forks source link

Create dockerfile from renv.lock file #10

Closed JosiahParry closed 3 years ago

JosiahParry commented 3 years ago

This PR adds a new function dock_from_renv() which creates a Dockerfile from an renv.lock file.

By default, this function uses the RStudio Public Package Manager (PPM) (use_rspm = TRUE) which enables us to utilize the Linux binaries provided by it. When this argument is set to true, it creates a new file renv.lock.dock which is copied into the Dockerfile as renv.lock. The purpose of this is to leave the existing renv.lock alone and still usable for individual development.

This function uses {pak} to resolve package dependencies and as such is added as an imported package.

The function only supports Ubuntu and Centos images.

JosiahParry commented 3 years ago

Things to do:

Create an option for mounting the renv package cache per https://twitter.com/chrisderv/status/1423021577675870213?s=20

ColinFay commented 3 years ago

Hey,

thank for this ! (And sorry for not getting back sooner.

Any reason for closing this now ?