containerit
containerit copied to clipboard
How can containered workspaces use MRAN/checkpoint or GRAN?
MRAN supports file style locations now: https://github.com/RevolutionAnalytics/checkpoint/pull/218
Also, this issue https://github.com/RevolutionAnalytics/checkpoint/issues/216#issuecomment-279167390 reports on how to make checkpoint work for an R Markdown document.
We may also check GRAN for retrieving versions of packages http://blog.revolutionanalytics.com/2014/08/gran-and-switchr-cant-send-you-back-in-time-but-they-can-send-r-sort-of.html
Since be default we rely on rocker/r-ver
images, which use MRAN set to the image build date, this works already then.
But a specific MRAN-creation instruction would also be nice! Just provide a date and code similar to the one in r-ver
-Dockerfile is created, see
- https://github.com/rocker-org/rocker-versioned/blob/master/r-ver/Makefile#L51
- https://github.com/rocker-org/rocker-versioned/blob/master/r-ver/Dockerfile#L113
The user would do something along the lines of...
setClass("CRANMirror", slots = list(baseurl = "string"), contains = "Instruction")
setClass("MRANMirror", slots = list(baseurl = "string", date = "date"), contains = "CRANMirror")
df <- dockerfile(...)
mirror <- CRANMirror("2017-01-01")
addInstruction(df, mirror)
The best way for now to select the MRAN mirror is to select the base image manually.
What containerit
could do is to see if MRAN a configured repo in the current session, and then also use that.
See also #150