RStudio Docker image for Analytics Platform. Used by RStudio helm chart.
NB Changes in this repository are public This work is done in an internal repository 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
The docker image is built using GitHub Actions and hosted on an internal ECR repository.
To add/remove R packages to this image, edit the R_packages
file accordingly then build the image remembering to
update the tag
make build
make up
- 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)
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:
-
slow chown - Rocker creates the home directory with ownership by 'rstudio' (1000). So AP needs to 'chown' it to 1001, otherwise users don't have permissions to the home dir. Once the home dir is full of files, the chown takes a while, slowing startup of RStudio.
-
affects other tools - The Jupyter image also has to use 1001 and do the chown, because it shares the home directory.
So maybe we could switch to just using the rstudio/1000 user?