2.1 Version-stable deployments
When deploying R applications (e.g. a Shiny app) using Docker containers, it is important to control versioning of R and packages for the sake of reproducibility and stability of the deployments. For this reason, version-stable images are provided as part of the Rocker project and used as a basis for deploying productive applications.
Each version-stable Rocker image has an associated tag for all non-latest R
versions (e.g. rocker/r-ver:4.4.1
). Besides being specific to the
corresponding version of R, each tag fixes the version of contributed packages
(by using as package repository the CRAN snapshot of the last day CRAN
distributed that R version as latest release). See
wiki/Versions.
If that R version is the latest, the CRAN date will not be set and the latest packages will always be installed.
The Dockerfile
of a deployed application then defines a given version-stable
image tag to start FROM
, e.g.
See SmaRP/Dockerfile for an example.