2 Version-stable R development with Docker

In the context of productive solutions, it is essential to have full control over the codebase and environment to ensure reproducibility and stability of the setup. In the case of R-based projects, this implies fixing and aligning the version of R as well as package and system dependencies. In order to achieve well-managed release pipelines, a key aspect is to guarantee full equivalence of the development setup to (alternative) target productive stages.

This guide illustrates an approach to manage a version-stable R development environment based on containerized solutions leveraging the Rocker project, allowing the coexistence of multiple dockerized development flavors, to match various target production environments or projects.

The instructions in this chapter are for R >= 4.0.0. Images for R <= 3.6.3 are defined in rocker-org/rocker-versioned, but are no longer actively maintained.