Self-hosted service
rocker-org/rocker avatar
rocker-org/rocker

rocker Docker Images for Reproducible R Environments

R configurations for Docker

1,517 stars264 forksShellGPL-2.0

At a glance

What is it?
rocker supplies Dockerfiles for R, RStudio, Shiny, compiler-sanitized, and package-repository images. It suits R users who need repeatable container environments, while image selection and tag management require deliberate review.
Who is it for?
Adopt rocker when an R user needs a documented Docker-based environment and can select the correct base image, R version, and optional services. Do not adopt it as a single fixed environment, because rocker is a collection of image recipes with different dependencies and use cases.
Can I use it commercially?
Yes, with conditions. GPL-2.0 is a copyleft licence: if you distribute software that includes it, you must release that software's source code under the same licence. Running it internally without distributing it does not trigger that obligation.
Is it still maintained?
Yes. The repository last received commits 121 days ago.
What is it written in?
Mainly Shell, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 20, 2026, and from our analysis. They are not legal advice.

Editorial analysis

rocker Targets Reproducible R Container Setup

rocker solves a specific packaging problem for R users: assembling R and the operating-system dependencies needed to run it inside Docker. An R installation on a workstation can depend on packages, compilers, repositories, and system libraries that are tedious to reproduce by hand. The rocker repository shifts that work into Dockerfiles and published container images. This is aimed at R users who want a repeatable starting point for an interactive session, development work, package installation, or services built on R. It is also relevant to teams that would rather exchange a defined container environment than document every host-level prerequisite.

The repository is not one application with its own runtime API. It is a collection of related image definitions. Its top-level directories include `r-base/`, `r-ver/`, `rstudio/`, `shiny`-related coverage described in the README, and specialized areas such as `r-apt/`, `r-bspm/`, `r-rmd/`, and `r-rspm/`. The README also points to separate repositories for versioned image stacks. That breadth is useful, but it makes image selection an architectural decision rather than a casual download.

The main audience therefore has some Docker context already. The README starts by requiring Docker and refers readers to Docker's installation documentation. It does not present rocker as a hosted R service or as a replacement for Docker itself. Docker supplies the container boundary and lifecycle, while rocker supplies R-oriented images and recipes.

Base Images Encode Different R Installation Policies

The image catalog begins with four base choices that make distinct assumptions about R and Debian. According to the README, `r-base` supplies the current R through `apt-get` and enables `debian:testing` and `unstable` repositories. `r-devel` adds R development files beside the `r-base` installation and provides the alias `RD`. `drd` is described as a lighter `r-devel` image that is not built quite daily. Finally, `r-ver` builds on `debian:stable` and lets a user specify an R version through the Docker tag.

That distinction affects more than the image name. A current-testing policy can expose newly available upstream software, while a stable Debian base makes a different compatibility choice. The README does not provide detailed compatibility guarantees, package inventories, or a table mapping every tag to an exact base image digest. It also does not document rollback. Users who require byte-for-byte reproducibility should not treat the moving concept of "current R" as a fixed environment without recording the selected tag and investigating its contents.

The specialized images extend these choices in similarly explicit ways. `r-devel-san` adds compiler sanitizers. `r-devel-ubsan-clang` combines sanitizers with the `clang` C compiler instead of `gcc`. `rstudio:testing` places RStudio on `debian:testing`, while `r-apt` adds R, CRAN, and the marutter repository information. These are not interchangeable convenience tags. They alter compiler behavior, repository policy, or the included tooling, and each should be selected for a defined task.

Starting rocker/r-base Requires Only Docker

The shortest documented first use starts the `r-base` container in an interactive terminal session. The `--rm` option removes the container when it exits, `-ti` allocates an interactive terminal, and the final argument selects the image. The README says to expect an interactive container based on the current R installation.

Docker must already be installed before this command is useful. Rocker does not document installation of the Docker engine in this repository; it links to Docker's installation documentation instead. For a first session, there is no need to build a local Dockerfile or choose a bind mount. This keeps the initial path short enough to show where the project sits: Docker pulls and runs the R-oriented image, while the user interacts with R inside it.

A first use that needs files outside the container requires more setup, but the README does not provide a general bind-mount command for `r-base`. The port instructions are specifically associated with `rstudio` and its derivative images. Do not add host mappings or volume flags from memory and present them as rocker-documented behavior. The README leaves those operational details to Docker documentation and the project wiki.

Rocker and RStudio Add a Network Boundary

The README separates the basic `r-base` path from `rstudio` and derivative containers such as `hadleyverse` and `ropensci`. Those interactive server images require a port to be opened before a browser on the host can reach the service. The project does not duplicate the command in the README. Instead, it sends users to the wiki page titled "Using the RStudio image", so port selection and forwarding remain outside the instructions documented there.

This distinction matters when comparing containers. A terminal-oriented `r-base` session does not automatically behave like a web service, and an RStudio container does not become reachable merely because Docker is running it. Container startup, exposed ports, and host-to-container routing are separate concerns. Selecting an RStudio image without reading the referenced wiki page leaves an important part of the workflow unspecified.

The README also says that the versioned stack builds on `rocker/r-ver`, with tags for a desired R version such as `:4.0.0`, `:latest`, or `:devel`. That makes the tag a configuration input rather than a cosmetic label. For R `3.x`, the README directs users to older recipes in `rocker-versioned`, while details for the newer stack are in `rocker-versioned2`. Rocker is therefore the entry point, but not necessarily the only repository involved in maintaining a chosen environment.

Image Flexibility Creates Version and Upgrade Work

Rocker gives users meaningful choices, but those choices impose maintenance work. An image based on `r-base` follows a current-R policy using testing and unstable Debian repositories. A user selecting an R version through `r-ver` accepts version-specific tags and a `debian:stable` base. Moving to another base is not merely an image rename because it can change the operating-system repositories and package resolution available to R.

The repository is not archived, and its last push was on 2026-06-24. However, the README explicitly calls the project "work in progress". It also lists no GitHub releases, so there is no release history in the repository metadata that can be used to frame upgrades as a sequence of stable, versioned releases. The build links and documentation can help identify image status, but the README does not define a supported-version policy or a general rollback procedure.

Image tags also create an upgrade decision. The moving `r-base` image and `:latest` tag should not be assumed to preserve the same operating-system packages, while a fixed version tag may age against its package repositories. The README does not quantify rebuild frequency for most images and describes `drd` only as not being built quite daily. Users should therefore track both the image they use and the Dockerfile or tag that defines it. The project is organized for that model, with image-specific top-level directories rather than a single unified runtime.

GPL-2.0 and Plain Dockerfiles Define Adoption Boundaries

The repository is primarily written in Shell, and its main deliverable is Docker configuration rather than an R package. The repository lists the `GPL-2.0` license. That designation matters when deciding how to distribute modified Dockerfiles or incorporate project files into another codebase, although this review does not provide legal advice. The license file is present at the repository root, so the exact terms should be read there before redistribution.

Compared with building one bespoke Dockerfile for a single project, rocker's approach supplies multiple established bases and composes specialist images from them. That can reduce the initial assembly work and gives users recognizable choices for current R, versioned R, RStudio, Shiny, compilers, and package repositories. The cost is less control over the image inventory. Users must understand what each base includes and whether its Debian or compiler policy matches the workload.

The opposite approach is to create and maintain a project-specific Dockerfile directly. That gives the author explicit control over every package and build step, but it also transfers all environment construction and upgrade work to that project. Rocker is the better fit when its catalog matches the required environment. It is the wrong choice when a user needs a narrowly fixed, fully documented package inventory that the README does not provide, or when using moving testing repositories is unacceptable. The practical judgement depends on matching one documented image policy to the reproducibility requirement.

Editorial conclusion

Adopt rocker when an R user needs a documented Docker-based environment and can select the correct base image, R version, and optional services. Do not adopt it as a single fixed environment, because rocker is a collection of image recipes with different dependencies and use cases. Verify first that the selected tag contains the required R version, whether a published image is acceptable, and whether an RStudio image needs an explicitly exposed port. The repository's last push was on 2026-06-24, but its status still describes the work as in progress.

Frequently asked questions

How do I start an interactive rocker R container?

After installing Docker, run `docker run --rm -ti rocker/r-base`. The README describes this as starting the `r-base` container in interactive mode.

Which rocker image should I use for a specific R version?

The README says `r-ver` builds on `debian:stable` and uses Docker tags to specify the desired R version. Its versioned stack includes tags such as `:4.0.0`, `:latest`, and `:devel`.

What must I do before using rocker's RStudio image?

The README says an RStudio container, including derivative containers, needs an opened port. It refers users to the project wiki page titled "Using the RStudio image" for the instructions.

Official sources

  1. Issues
  2. License: GPL-2.0
  3. Project website
  4. README
  5. rocker-org/rocker on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/rocker-org-rocker.svg)](https://hysenlabs.com/projects/rocker-org-rocker)

Was this useful?