-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from statisticsnorway/dockerfiles
Add dockerfiles for base and dev
- Loading branch information
Showing
5 changed files
with
102 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
* text=auto eol=lf | ||
*.ipynb filter=nbstripout | ||
*.ipynb diff=ipynb |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,49 @@ | ||
# docker-rpython | ||
Repo for creating a docker images containing both python and R, for use in CI and as | ||
dev containers. | ||
|
||
Repo for creating a docker images containing both python and R, for use in vscode asCI and dev containers. | ||
## Installed R-packages | ||
The following R-packages with their dependencies are installed in the conatainer image: | ||
|
||
Opprettet av: | ||
arneso-ssb <[email protected]> | ||
From CRAN: | ||
* dplyr | ||
* gausssuppression | ||
* httpgd | ||
* languageserver | ||
* modsem | ||
* shiny | ||
* ssbtools | ||
|
||
--- | ||
From GitHub: | ||
* ssb-metodebiblioteket | ||
* ssb-ssb-fellesr | ||
|
||
Legg inn beskrivelse av prosjektet her. | ||
## Usage | ||
```shell | ||
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-image | ||
``` | ||
|
||
docker pull | ||
|
||
## Build docker images | ||
|
||
### GitHub Action image (base) | ||
|
||
From the root of the repo: | ||
|
||
```shell | ||
cd docker-base | ||
docker build -t ghcr.io/statisticsnorway/docker-rpython-base:1.0 . | ||
docker push ghcr.io/statisticsnorway/docker-rpython-base:1.0 | ||
``` | ||
|
||
### Dev image | ||
|
||
From the root of the repo: | ||
|
||
```shell | ||
cd docker-dev | ||
docker build -t ghcr.io/statisticsnorway/docker-rpython-dev:1.0 . | ||
docker push ghcr.io/statisticsnorway/docker-rpython-dev:1.0 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
FROM rocker/r2u:24.04 | ||
|
||
LABEL org.opencontainers.image.source=https://github.com/statisticsnorway/docker-rpython | ||
LABEL org.opencontainers.image.description="Container for running both python and R, based on r2u." | ||
LABEL org.opencontainers.image.licenses=MIT | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y --no-install-recommends \ | ||
git \ | ||
micro \ | ||
nano \ | ||
pipx \ | ||
python3-pip \ | ||
python3-poetry \ | ||
python3-venv \ | ||
r-cran-dplyr \ | ||
r-cran-gausssuppression \ | ||
r-cran-httpgd \ | ||
r-cran-languageserver \ | ||
r-cran-modsem \ | ||
r-cran-shiny \ | ||
r-cran-ssbtools \ | ||
sudo \ | ||
&& apt-get purge -y --auto-remove \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
RUN R -e "remotes::install_github(c(\ | ||
'statisticsnorway/ssb-metodebiblioteket', \ | ||
'statisticsnorway/ssb-fellesr' \ | ||
))" | ||
|
||
RUN pipx ensurepath && pipx install nox && pipx inject nox nox-poetry | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
FROM ghcr.io/statisticsnorway/docker-rpython-base:1.0 | ||
|
||
LABEL org.opencontainers.image.source=https://github.com/statisticsnorway/docker-rpython | ||
LABEL org.opencontainers.image.description="Container for running both python and R." | ||
LABEL org.opencontainers.image.licenses=MIT | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y --no-install-recommends \ | ||
libcairo2-dev \ | ||
libcurl4-openssl-dev \ | ||
libfontconfig1-dev \ | ||
libfreetype6-dev \ | ||
libfribidi-dev \ | ||
libharfbuzz-dev \ | ||
libjpeg-dev \ | ||
libpango1.0-dev \ | ||
libpng-dev \ | ||
libssl-dev \ | ||
libtiff-dev \ | ||
libxml2-dev \ | ||
python-is-python3 \ | ||
python3 \ | ||
python3-dev \ | ||
&& apt-get purge -y --auto-remove \ | ||
&& rm -rf /var/lib/apt/lists/* |