• Stars
    star
    402
  • Rank 107,380 (Top 3 %)
  • Language
    Shell
  • License
    GNU General Publi...
  • Created almost 5 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Run current & prior versions of R using docker. rocker/r-ver, rocker/rstudio, rocker/shiny, rocker/tidyverse, and so on.

Version-stable Rocker images

license Project Status: Active – The project has reached a stable, usable state and is being actively developed. Update container definition files Build & Push Core images Build & Push R devel images and RStudio daily build images

Visit rocker-project.org for more about available Rocker images, configuration, and use.

Overview

This repository provides rocker/r-ver and its derived images, alternate stack to r-base, with an emphasis on reproducibility.

Compared to r-base, this stack:

  • Builds on Ubuntu LTS rather than Debian and system libraries are tied to the Ubuntu version. Images will use the most recent LTS available at the time when the corresponding R version was released.
    • Since compatibility problems are likely to occur immediately after the release of a new Ubuntu LTS, the version to be used is the one that is at least 90 days past release.
      • rocker/r-ver:4.0.0 is based on Ubuntu 20.04 (ubuntu:focal) because no interval was set at the time of the Ubuntu 20.04 release.
  • Installs a fixed version of R itself from source, rather than whatever is already packaged for Ubuntu (the r-base stack gets the latest R version as a binary from Debian unstable).
  • The only platforms available are linux/amd64 and linux/arm64 (arm64 images are experimental and only available for rocker/r-ver 4.1.0 or later).
  • Set the Posit Public Package Manager (RStudio Package Manager, RSPM) as default CRAN mirror. For the amd64 platform, RSPM serves compiled Linux binaries of R packages and greatly speeds up package installs.
  • Non-latest R version images installs all R packages from a fixed snapshot of CRAN mirror at a given date. This setting ensures that the same version of the R package is installed no matter when the installation is performed.
    • In addition to CRAN mirror, the version of RStudio Server installed in rocker/rstudio and the date of CTAN mirror set in rocker/verse are also fixed. Please check the document about versions for details.
  • Provides images that are generally smaller than the r-base series.

Note: This repository is for R >= 4.0.0 images. For images with R <= 3.6.3, please see the rocker-versioned repository, or the shiny, geospatial, and binder repositories.

Pre-built images

The following images have been built and are available on DockerHub or GitHub Container Registry.

For more information about these container images, please see the Wiki of this repository.

Image list

Check the Rocker project site for the list of images.

Tags

Check the Wiki for the list of tags.

Spacial tags for daily builds

There are also special tags that are not listed in the wiki, devel and latest-daily. The GitHub Actions workflow build and push these images daily.

  • The devel images are based on ubuntu:latest (the latest Ubuntu LTS version) and install the latest R-devel daily snapshot. devel tag is vailable for rocker/r-ver, rocker/rstudio, rocker/tidyverse, rocker/verse.
  • The latest-daily tag images are based on rocker/r-ver:latest and install the latest RStudio daily build. latest-daily tag is available for rocker/rstudio, rocker/tidyverse, rocker/verse.

Spacial tags for geospatial toolkit

rocker/geospatial:ubuntugis (rocker/geospatial:X.Y.Z-ubuntugis) and rocker/geospatial:dev-osgeo are special images that differ slightly from the regular rocker/geospatial.

Modifying and extending images

Check the Rocker project site for common methods for Rocker images.

Install R packages

Please install R packages from source using the install.packages() R function or the install2.r script, and use apt only to install necessary system libraries (e.g. libxml2). Do not use apt install r-cran-* to install R packages.

If you would prefer to install only the latest verions of packages from pre-built binaries using apt, consider using r-base or rocker/r-bspm instead.

Rocker scripts

The Docker images built from this repository describe the software installation method in standalone scripts rather than directly in the Dockerfiles. These files are under the scripts directory, and these files are copied in all Docker images, under a top-level /rocker_scripts directory. This allows users to extend images by selecting additional modules to install on top of any pre-built images.

For instance, if one wishes to install Shiny Server on top of a base of rocker/rstudio:4.0.0, one could write a simple Dockerfile as follows:

FROM rocker/rstudio:4.0.0
RUN /rocker_scripts/install_shiny_server.sh

Install scripts can generally take a version as a first argument or ingest an environment variable to specify the version to install. So to install fixed versions, one can use either of the following syntaxes:

FROM rocker/rstudio:4.0.0
ENV SHINY_SERVER_VERSION 1.5.14.948
RUN /rocker_scripts/install_shiny_server.sh
FROM rocker/rstudio:4.0.0
RUN /rocker_scripts/install_shiny_server.sh 1.5.14.948

RStudio Server and Shiny Server are managed by the S6 supervisor system, which allows containers to manage multiple background processes gracefully.

Note: No longer support ADD= runtime triggers for installing Shiny or similar modules, which is used for R <= 3.6.3 images.

Build images

Container definition files

Dockerfiles and docker-bake.json files, which define the pre-built images, are in the dockerfiles folder and the bakefiles folder. And, these files are created from the JSON files under the stacks folder by the build scripts under the build folder.

When a new version of R or RStudio is released, GitHub Actions will automatically create a Pull Request to update these files.

Update pre-built images

Latest R version images will be built on a rolling basis; when the Dockerfiles are updated, they are immediately built by GitHub Actions.

Non-latest R version images will be built when a new R version is released. At this time, a tag and a GitHub release will also be created.

Contributing

Please check https://github.com/rocker-org/rocker/wiki/How-to-contribute.

License

The Dockerfiles and the scripts in this repository are licensed under the GPL 2 or later.

More Repositories

1

rocker

R configurations for Docker
Shell
1,446
star
2

rocker-versioned

Run current & prior versions of R using docker
Dockerfile
297
star
3

shiny

HTML
220
star
4

geospatial

Docker-based Geospatial toolkit for R, built on versioned Rocker images
Dockerfile
111
star
5

binder

Template for RStudio on Binder / JupyterHub
Dockerfile
69
star
6

ml

experimental machine learning container
Shell
50
star
7

devcontainer-features

A collection of Dev Container Features.
Shell
49
star
8

devcontainer-templates

Dev Container Templates to use Rocker based Dev Containers. Useful Templates for using R in GitHub Codespaces, etc.
Shell
23
star
9

ropensci

Dockerfile providing RStudio + Hadleyverse + rOpenSci packages
21
star
10

r-parallel

A Docker container with base R + several parallel/asynchronous packages
Shell
16
star
11

devcontainer-try-r

This repository contains some example Dev Container definitions for R and can be run on GitHub Codespaces.
Dockerfile
16
star
12

r-devel-san-clang

R devel with ASAN / UBSAN sanitizers using clang/clang++
Shell
14
star
13

devcontainer-images

R Docker images built with Dev Container Features
Makefile
12
star
14

r-devel-san

R devel with ASAN / UBSAN sanitizers
Shell
10
star
15

rstudio-daily

Daily builds of pre-release RStudio, built on daily builds of pre-release R. Live on the bleeding edge.
Shell
8
star
16

r2u

Rocker for use with r2u repository
Shell
7
star
17

rocker-paper

TeX
7
star
18

website

A website for the Rocker Project
Lua
6
star
19

ubuntu-lts

R Containers for Ubuntu LTS
Shell
6
star
20

drd

Docker R-Devel
Perl
4
star
21

drp

Docker R-Patched
Perl
2
star
22

rspm

Rocker RSPM Containers
Shell
2
star
23

bspm

Rocker BSPM Containers
Dockerfile
1
star
24

r-devel

Perl
1
star