
The Docker base image to use for a run
Source:R/reproducibility_check_docker.R
dot-repro_docker_image_for.RdBy default returns the pre-built .repro_docker_default_image regardless
of what R version the paper declared – fast (most dependencies are
already installed), but runs against whatever R version that image was
built with, not necessarily the paper's own. When use_declared_version
is TRUE, picks the rocker/r-ver tag matching the R version
.code_version_pin_check() found declared in the paper's repository (an
renv.lock's R.Version, or a sessionInfo() dump's first line — see
that function) instead — a bare image with nothing pre-installed, so
every dependency is installed from scratch, but it matches the paper's
own declared environment. Falls back to bare rocker/r-ver:latest (not
the pre-built image) when use_declared_version = TRUE but nothing was
declared, since there is no version to match in that case either way, and
silently reusing the pre-built image would defeat the point of asking for
version-matching in the first place.
Usage
.repro_docker_image_for(
r_versions = character(0),
use_declared_version = FALSE
)