opensafely-core / codespaces-initiative

Improving the use of OpenSAFELY in Codespaces
MIT License
0 stars 0 forks source link

ADR: Having a single, customised dev container environment #55

Closed lucyb closed 4 weeks ago

lucyb commented 2 months ago

Write an ADR in this format to record why we have a single, customised dev container environment and what the consequences of this decision are.

[!NOTE] Please read Michael Nygard's blog post about how to document an architecture decision first.

Rough outline of decision

We will have a single dev container environment, with a single custom Docker image, available for researchers to use within Codespaces.

We believe having a single setup better matches the researcher’s mental model of how the system works and is how they expect to work. It provides a less steep learning curve.

Rough context

We originally had a single dev container environment with a generic Docker image. However, we wanted to improve this to provide a more "habitable" environment for researchers in which to write code. This included providing RStudio, as the majority of researchers write R code.

An alternative option was to have separate python and R configurations and Docker images. However:

Multiple setups would add a larger burden on to researchers for both copying and maintaining the dev container config in their local repo and then keeping their code in sync with the correct dev container env later.

iaindillingham commented 1 month ago

I think we should document why we chose to use rocker/rstudio:4.0.5 as the base image. I asked a couple of questions about this choice on Slack.^1 They might be useful when writing this ADR.