Skip to content

Analytical Platform RStudio Public • This repository is defined and managed in Terraform

License

Notifications You must be signed in to change notification settings

ministryofjustice/analytics-platform-rstudio-public

Repository files navigation

analytics-platform-rstudio

RStudio Docker image for Analytics Platform. Used by RStudio helm chart.

NB Changes in this repo are public This work is done in an internal repo and immediately sync'ed to a public copy. This allows the sensitive CI/CD to run in private, but to maintain our commitment to code in the open. Further info

Builds

The docker image is built using GitHub Actions and hosted on an internal ECR repository.

Usage

To add/remove R packages to this image, edit the R_packages file accordingly then build the image remembering to update the tag

Build

make build

Run locally

make up

Design discussion

  • Rocker is the standard Docker image for R
  • We choose "verse" variant (because we want TinyTeX)
  • Install Conda, because that is our recommended package manager
  • Install a few system packages needed by analysts, which really can't be installed by user with Conda (minimize these as they bloat everyone)

Users

The rocker image creates 'rstudio' user (uid 1000) for normal user use. However AP's Dockerfile introduces another user, named after the user's GitHub username (uid 1001). We're not entirely sure.

There are a couple of consequences of using uid 1001:

So maybe we could switch to just using the rstudio/1000 user?