Open iaindillingham opened 2 years ago
(sorry for long post)
Below is what I think would be the most stable and easiest approach for you to maintain long term (because it's what rocker/r-ver
, Microsoft, and RStudio Cloud do - the key for stable maintenance for you is just to install packages from CRAN from the same day in an image).
legacy
rocker/r-ver
have a tag at each R version number (i.e., 4.0.2
, 4.0.5
, 4.1.3
) which builds on the corresponding rocker/r-ver:tag
rocker/r-ver
uses are listed in the table here (I think the rocker/r-ver images have these CRAN dates using an RSPM snapshot set already - just need to check whether that's for source or binary packages - if source obtain the URL for the binaries from here)4.0.2
, 4.0.5
, 4.1.3
4.0.2.2
4.0.2.2020-10-01
A subtlety here is that if you followed this approach you wouldn't want users on latest
because with rocker/r-ver
the latest
tag corresponds to the latest version of R and CRAN packages from the day it's run
4.2.0
but this will change to 4.2.1
tomorrow as the latest version of R is released4.0.0
) or last patch release of previous sequence (4.1.3
) 4.2.0.2022-06-21
Also, I have made a second version of the reverse engineered Dockerfile which minimises the number of layers (apparently better Dockerfile practice).
original version is in reverse-engineer branch (too many layers really) Dockerfile here
minimised layers version reverse-engineer-min-layers branch Dockerfile here
I will try and keep both upto date if additional packages are added.
Here are some possible next steps for r-docker, following a meeting with @bloodearnest, @milanwiedemann, and @rebkwok. They're arranged from least to most effort, over the short-to-medium term.
Continue to update the existing image. Address:
99
88
74
51
36
Fix the image.
Create a new - and reversion the existing - image.
r:legacy
; the new image could becomer:latest
s/r:latest/r:legacy/
Handle dependencies better.
opensafely add-dependency ...
)