Repo for creating a docker images containing both python and R, for use in CI and as dev containers.
The images contains tools like poetry and nox, so no need to install them in the CI pipeline.
The following R-packages with their dependencies are installed in the base container image:
From CRAN:
- dplyr
- gausssuppression
- httpgd
- languageserver
- modsem
- shiny
- ssbtools
From GitHub:
- ssb-metodebiblioteket
- ssb-ssb-fellesr
- python 3.12
- R 4.4
- poetry 2.1
- nox 2025.2.9
The docker images are published as GitHub Packages on this page.
docker pull ghcr.io/statisticsnorway/docker-rpython-base:latest # Image for use in GitHub Actions
docker pull ghcr.io/statisticsnorway/docker-rpython-dev:latest # Latest dev-imageBoth docker images are built and published when a tag starting with v is pushed
to the repo. Example:
git tag # List existing tags, pick the next one
git tag -a v1.0.3 -m"Tagging docker image" # create new tag
git push --tagsFrom the root of the repo:
cd base
docker build -t ghcr.io/statisticsnorway/docker-rpython-base:1.0 .
docker push ghcr.io/statisticsnorway/docker-rpython-base:1.0From the root of the repo:
cd dev
docker build -t ghcr.io/statisticsnorway/docker-rpython-dev:1.0 .
docker push ghcr.io/statisticsnorway/docker-rpython-dev:1.0Your PAT must have the read:packages scope.
export CR_PAT=<YourPAT>
echo $CR_PAT | docker login ghcr.io -u USERNAME --password-stdin