Skip to content
Snippets Groups Projects
Verified Commit 731cb7a3 authored by Olivier Benz's avatar Olivier Benz
Browse files

Merge branch 'master' into freeze-version

parents d2f53e89 b770b02f
No related branches found
No related tags found
No related merge requests found
---
name: Tracking issue
about: This repository is the source for R <= 3.6.3 images built before 2020-04; issues for R >= 4.0.0 images built after 2020-04 should be created in https://github.com/rocker-org/rocker-versioned2, not here.
---
<!-- This repository is the source for R <= 3.6.3 images built before 2020-04; issues for R >= 4.0.0 images built after 2020-04 should be created in https://github.com/rocker-org/rocker-versioned2, not here. -->
[![CircleCI](https://circleci.com/gh/rocker-org/rocker-versioned.svg?style=svg)](https://circleci.com/gh/rocker-org/rocker-versioned)
[![license](https://img.shields.io/badge/license-GPLv2-blue.svg)](https://opensource.org/licenses/GPL-2.0)
[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](http://www.repostatus.org/badges/latest/active.svg)](http://www.repostatus.org/#active)
[![Project Status: Moved to https://github.com/rocker-org/rocker-versioned2 – The project has been moved to a new location, and the version at that location should be considered authoritative.](https://www.repostatus.org/badges/latest/moved.svg)](https://github.com/rocker-org/rocker-versioned2)
[![DOI](https://zenodo.org/badge/25048007.svg)](https://zenodo.org/badge/latestdoi/25048007)
Visit [rocker-project.org](https://rocker-project.org) for more about available Rocker images, configuration, and use.
# MOVED to [`rocker-versioned2`](https://github.com/rocker-org/rocker-versioned2)
## Version-stable Rocker images
This repository contains archived build scripts from the 3.x versioned series only. Visit [`rocker-versioned2`](https://github.com/rocker-org/rocker-versioned2) for current build scripts for 4.x versioned images.
## Version-stable Rocker images for R 3.x
![rocker](https://avatars0.githubusercontent.com/u/9100160?v=3&s=200)
***For documentation for R >= 4.0.0, for images `r-ver`, `rstudio`, `tidyverse`, `verse`, `geospatial`, `shiny`, and `binder`, please see the [`rocker-versioned2` repository](https://github.com/rocker-org/rocker-versioned2).***
image | description | size | metrics | build status
---------------- | ----------------------------------------- | ------ | ------- | --------------
[r-ver](https://hub.docker.com/r/rocker/r-ver) | Version-stable base R & src build tools | [![](https://images.microbadger.com/badges/image/rocker/r-ver.svg)](https://microbadger.com/images/rocker/r-ver) | [![](https://img.shields.io/docker/pulls/rocker/r-ver.svg)](https://hub.docker.com/r/rocker/r-ver) | [![](https://img.shields.io/docker/automated/rocker/r-ver.svg)](https://hub.docker.com/r/rocker/r-ver/builds)
[rstudio](https://hub.docker.com/r/rocker/rstudio) | Adds rstudio | [![](https://images.microbadger.com/badges/image/rocker/rstudio-stable.svg)](https://microbadger.com/) | [![](https://img.shields.io/docker/pulls/rocker/rstudio.svg)](https://hub.docker.com/r/rocker/rstudio) | [![](https://img.shields.io/docker/automated/rocker/rstudio.svg)](https://hub.docker.com/r/rocker/rstudio/builds)
[rstudio](https://hub.docker.com/r/rocker/rstudio) | Adds rstudio | [![](https://images.microbadger.com/badges/image/rocker/rstudio-stable.svg)](https://microbadger.com/images/rocker/rstudio) | [![](https://img.shields.io/docker/pulls/rocker/rstudio.svg)](https://hub.docker.com/r/rocker/rstudio) | [![](https://img.shields.io/docker/automated/rocker/rstudio.svg)](https://hub.docker.com/r/rocker/rstudio/builds)
[tidyverse](https://hub.docker.com/r/rocker/tidyverse) | Adds tidyverse & devtools | [![](https://images.microbadger.com/badges/image/rocker/tidyverse.svg)](https://microbadger.com/images/rocker/tidyverse) | [![](https://img.shields.io/docker/pulls/rocker/tidyverse.svg)](https://hub.docker.com/r/rocker/tidyverse) | [![](https://img.shields.io/docker/automated/rocker/tidyverse.svg)](https://hub.docker.com/r/rocker/tidyverse/builds)
[verse](https://hub.docker.com/r/rocker/verse) | Adds tex & publishing-related packages | [![](https://images.microbadger.com/badges/image/rocker/verse.svg)](https://microbadger.com/images/rocker/verse) | [![](https://img.shields.io/docker/pulls/rocker/verse.svg)](https://hub.docker.com/r/rocker/verse) | [![](https://img.shields.io/docker/automated/rocker/verse.svg)](https://hub.docker.com/r/rocker/verse/builds)
......
......@@ -52,9 +52,9 @@ docker build --build-arg RSTUDIO_VERSION=1.1.414 -t rocker/rstudio:3.4.2 .
| 3.5.1 | 2018-12-20 | 1.1.463 | stretch (9) |
| 3.5.2 | 2019-03-11 | 1.1.463 | stretch (9) |
| 3.5.3 | 2019-04-26 | 1.2.1335 | stretch (9) |
| 3.6.0 | 2019-07-05 | | stretch (9) |
| 3.6.1 | 2019-12-12 | | stretch (9) |
| 3.6.2 | 2020-02-29 | | buster (10) |
| 3.6.3 | latest | latest | buster (10) |
| 3.6.0 | 2019-07-05 | 1.2.1335 | stretch (9) |
| 3.6.1 | 2019-12-12 | 1.2.5019 | stretch (9) |
| 3.6.2 | 2020-02-29 | 1.2.5033 | buster (10) |
| 3.6.3 | 2020-04-24 | 1.2.5042 | buster (10) |
Images starting with 4.0.0 are based on the stable Ubuntu release contemporary with the R version release (i.e. `ubuntu:focal` for 4.0.x and 4.1.x), and pin versions of RStudio, R packages and other software as defined in https://github.com/rocker-org/rocker-versioned2/tree/master/stacks
......@@ -5,27 +5,35 @@ services:
variables:
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: "/certs"
R_VERSION: "4.2.0"
UPDATE_MODE: "false"
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- export VERSION_MAJ_MIN_PAT=`cat geospatial/latest.Dockerfile | head -n1 | sed 's/.*\([0-9].[0-9].[0-9]\)/\1/'`
- export VERSION_MAJ_MIN=`echo "${VERSION_MAJ_MIN_PAT:0:3}"`
- export VERSION_MAJ=`echo "${VERSION_MAJ_MIN_PAT:0:1}"`
- >
echo $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER
--password-stdin $CI_REGISTRY
- >
export VERSION_MAJ_MIN_PAT=$R_VERSION
export VERSION_MAJ_MIN=`echo $VERSION_MAJ_MIN_PAT |
sed -n "s|\([[:digit:]]\+\.[[:digit:]]\+\).*|\1|p"`
export VERSION_MAJ=`echo $VERSION_MAJ_MIN_PAT |
sed -n "s|\([[:digit:]]\+\).*|\1|p"`
build-latest:
stage: build
script:
- >
cd geospatial && docker build --pull --build-arg NCPUS=$((`nproc`/2+1))
-t $CI_REGISTRY_IMAGE:latest -f latest.Dockerfile .
- docker tag $CI_REGISTRY_IMAGE:latest $CI_REGISTRY_IMAGE:$VERSION_MAJ_MIN_PAT
- docker tag $CI_REGISTRY_IMAGE:latest $CI_REGISTRY_IMAGE:$VERSION_MAJ_MIN
- docker tag $CI_REGISTRY_IMAGE:latest $CI_REGISTRY_IMAGE:$VERSION_MAJ
- docker push $CI_REGISTRY_IMAGE:latest
- docker push $CI_REGISTRY_IMAGE:$VERSION_MAJ_MIN_PAT
- docker push $CI_REGISTRY_IMAGE:$VERSION_MAJ_MIN
- docker push $CI_REGISTRY_IMAGE:$VERSION_MAJ
docker build --pull
--build-arg R_VERSION
--build-arg NCPUS=$((`nproc`/2+1))
-t $CI_REGISTRY_IMAGE:latest
-t $CI_REGISTRY_IMAGE:$VERSION_MAJ_MIN_PAT
-t $CI_REGISTRY_IMAGE:$VERSION_MAJ_MIN
-t $CI_REGISTRY_IMAGE:$VERSION_MAJ
-f geospatial/latest.Dockerfile .
- docker push -a $CI_REGISTRY_IMAGE
rules:
- if: $CI_COMMIT_BRANCH == "master" && $UPDATE_MODE != "true"
changes:
......@@ -35,10 +43,13 @@ build-version:
stage: build
script:
- >
cd geospatial && docker build --pull --build-arg NCPUS=$((`nproc`/2+1))
-t $CI_REGISTRY_IMAGE:4.1.3 -f 4.1.3.Dockerfile .
- docker push $CI_REGISTRY_IMAGE:4.1.3
docker build --pull
--build-arg R_VERSION
--build-arg NCPUS=$((`nproc`/2+1))
-t $CI_REGISTRY_IMAGE:$VERSION_MAJ_MIN_PAT
-f geospatial/$R_VERSION.Dockerfile .
- docker push -a $CI_REGISTRY_IMAGE
rules:
- if: $CI_COMMIT_BRANCH == "freeze-version" && $UPDATE_MODE != "true"
- if: $CI_COMMIT_BRANCH == "freeze-version" && $CI_PIPELINE_TRIGGERED
changes:
- geospatial/4.1.3.Dockerfile
- geospatial/$R_VERSION.Dockerfile
FROM registry.gitlab.b-data.ch/rocker/verse:4.1.3
ARG R_VERSION
FROM registry.gitlab.b-data.ch/rocker/verse:${R_VERSION}
ARG NCPUS=1
......@@ -26,7 +28,6 @@ RUN apt-get update \
unixodbc-dev \
&& install2.r --error --skipinstalled -n $NCPUS \
RColorBrewer \
RandomFields \
RNetCDF \
classInt \
deldir \
......@@ -52,8 +53,11 @@ RUN apt-get update \
terra \
tidync \
tmap \
geoR \
geosphere \
## Archived on 2022-05-04 as check problems were not corrected in time.
&& Rscript -e "devtools::install_version('RandomFields', version = '3.3.14')" \
## Archived on 2022-05-04 as requires archived package 'RandomFields'.
&& Rscript -e "devtools::install_version('geoR', version = '1.8-1')" \
## from bioconductor
&& R -e "BiocManager::install('rhdf5', update = FALSE, ask = FALSE)" \
## Clean up
......
......@@ -9,7 +9,7 @@
if [[ $CI_COMMIT_BRANCH == "master" ]]; then
export CI_APP_TAG=${CI_APP_TAG:-latest}
elif [[ $CI_COMMIT_BRANCH == "freeze-version" ]]; then
export CI_APP_TAG=${CI_APP_TAG:-4.1.3}
export CI_APP_TAG=${CI_APP_TAG:-$R_VERSION}
else
export CI_APP_TAG=${CI_APP_TAG:-$CI_COMMIT_SHA}
fi
......@@ -17,9 +17,7 @@
echo $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER
--password-stdin $CI_REGISTRY
- >
export VERSION_MAJ_MIN_PAT=`sed -n
"s|.*R_VERSION=\([[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]\+\).*|\1|p"
r-ver/$CI_APP_TAG.Dockerfile | head -1`
export VERSION_MAJ_MIN_PAT=$R_VERSION
export VERSION_MAJ_MIN=`echo $VERSION_MAJ_MIN_PAT |
sed -n "s|\([[:digit:]]\+\.[[:digit:]]\+\).*|\1|p"`
......@@ -35,8 +33,8 @@
variables:
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: "/certs"
CRAN: https://cloud.r-project.org
UPDATE_MODE: "false"
R_VERSION: "4.2.0"
CRAN: "https://cloud.r-project.org"
before_script:
- *before-script-build
......@@ -47,12 +45,13 @@ build:latest-linux-amd64:
- os:linux
script:
- >
docker build --build-arg CRAN=$CRAN --pull -t $CI_APP_REPO:$CI_APP_TAG-linux-amd64
docker build --pull
--build-arg CRAN
--build-arg R_VERSION
-t $CI_APP_REPO:$CI_APP_TAG-linux-amd64
-t $CI_APP_REPO:$VERSION_MAJ_MIN_PAT-linux-amd64
-f r-ver/$CI_APP_TAG.Dockerfile .
- |
docker push $CI_APP_REPO:$CI_APP_TAG-linux-amd64
docker push $CI_APP_REPO:$VERSION_MAJ_MIN_PAT-linux-amd64
-f r-ver/latest.Dockerfile .
- docker push -a $CI_APP_REPO
rules:
- if: $CI_COMMIT_BRANCH == "master" && $CI_BUILD_PLATFORMS =~ /(linux\/amd64)/
changes:
......@@ -65,12 +64,13 @@ build:latest-linux-arm64v8:
- os:linux
script:
- >
docker build --build-arg CRAN=$CRAN --pull -t $CI_APP_REPO:$CI_APP_TAG-linux-arm64v8
docker build --pull
--build-arg CRAN
--build-arg R_VERSION
-t $CI_APP_REPO:$CI_APP_TAG-linux-arm64v8
-t $CI_APP_REPO:$VERSION_MAJ_MIN_PAT-linux-arm64v8
-f r-ver/$CI_APP_TAG.Dockerfile .
- |
docker push $CI_APP_REPO:$CI_APP_TAG-linux-arm64v8
docker push $CI_APP_REPO:$VERSION_MAJ_MIN_PAT-linux-arm64v8
-f r-ver/latest.Dockerfile .
- docker push -a $CI_APP_REPO
rules:
- if: $CI_COMMIT_BRANCH == "master" && $CI_BUILD_PLATFORMS =~ /(linux\/arm64\/v8)/
changes:
......@@ -83,13 +83,16 @@ build:version-linux-amd64:
- os:linux
script:
- >
docker build --build-arg CRAN=$CRAN --pull -t $CI_APP_REPO:$CI_APP_TAG-linux-amd64
-f r-ver/$CI_APP_TAG.Dockerfile .
docker build --pull
--build-arg CRAN
--build-arg R_VERSION
-t $CI_APP_REPO:$CI_APP_TAG-linux-amd64
-f r-ver/$R_VERSION.Dockerfile .
- docker push $CI_APP_REPO:$CI_APP_TAG-linux-amd64
rules:
- if: $CI_COMMIT_BRANCH == "freeze-version" && $CI_BUILD_PLATFORMS =~ /(linux\/amd64)/
changes:
- r-ver/4.1.3.Dockerfile
- r-ver/$R_VERSION.Dockerfile
build:version-linux-arm64v8:
extends: .build
......@@ -98,13 +101,16 @@ build:version-linux-arm64v8:
- os:linux
script:
- >
docker build --build-arg CRAN=$CRAN --pull -t $CI_APP_REPO:$CI_APP_TAG-linux-arm64v8
-f r-ver/$CI_APP_TAG.Dockerfile .
docker build --pull
--build-arg CRAN
--build-arg R_VERSION
-t $CI_APP_REPO:$CI_APP_TAG-linux-arm64v8
-f r-ver/$R_VERSION.Dockerfile .
- docker push $CI_APP_REPO:$CI_APP_TAG-linux-arm64v8
rules:
- if: $CI_COMMIT_BRANCH == "freeze-version" && $CI_BUILD_PLATFORMS =~ /(linux\/arm64\/v8)/
changes:
- r-ver/4.1.3.Dockerfile
- r-ver/$R_VERSION.Dockerfile
build-manifest:latest-linux-multiarch:
extends: .build
......@@ -165,21 +171,7 @@ build-manifest:version-linux-multiarch:
rules:
- if: $CI_COMMIT_BRANCH == "freeze-version"
changes:
- r-ver/4.1.3.Dockerfile
trigger-latest-build-foreign:
extends: .build
stage: .post
before_script:
- apk upgrade --no-cache
- apk add --update --no-cache curl
script:
- curl -X POST -F token=$R_TIDYVERSE -F ref=master https://gitlab.b-data.ch/api/v4/projects/173/trigger/pipeline
- curl -X POST -F token=$R_PLUMBER -F ref=master https://gitlab.b-data.ch/api/v4/projects/176/trigger/pipeline
rules:
- if: $CI_COMMIT_BRANCH == "master" && $UPDATE_MODE != "true"
changes:
- r-ver/latest.Dockerfile
- r-ver/$R_VERSION.Dockerfile
trigger-latest-build:
extends: .build
......@@ -205,4 +197,4 @@ trigger-version-build:
rules:
- if: $CI_COMMIT_BRANCH == "freeze-version"
changes:
- r-ver/4.1.3.Dockerfile
- r-ver/$R_VERSION.Dockerfile
ARG IMAGE=debian:bullseye
ARG R_VERSION=4.1.3
ARG BLAS=libopenblas-dev
ARG R_VERSION
ARG CRAN=https://cran.rstudio.com
FROM registry.gitlab.b-data.ch/r/rsi/${R_VERSION}/${IMAGE} as rsi
FROM ${IMAGE}
LABEL org.opencontainers.image.licenses="GPL-2.0" \
org.opencontainers.image.source="https://gitlab.b-data.ch/r/docker-stack" \
org.opencontainers.image.source="https://gitlab.b-data.ch/rocker/docker-stack" \
org.opencontainers.image.vendor="b-data GmbH" \
org.opencontainers.image.authors="Olivier Benz <olivier.benz@b-data.ch>"
ARG IMAGE=debian:bullseye
ARG IMAGE
ARG DEBIAN_FRONTEND=noninteractive
ARG BLAS=libopenblas-dev
ARG R_VERSION=4.1.3
ARG BLAS
ARG R_VERSION
ARG CRAN
ARG BUILD_DATE
ARG CRAN=https://cran.rstudio.com
## Setting a BUILD_DATE will set CRAN to the matching MRAN date
## No BUILD_DATE means that CRAN will default to latest
ENV BASE_IMAGE=${IMAGE} \
......@@ -46,7 +48,7 @@ RUN apt-get update \
liblapack-dev \
liblzma-dev \
${BLAS} \
libpangocairo-1.0.0 \
libpangocairo-1.0-0 \
libpaper-utils \
'^libpcre[2|3]-dev$' \
libpng-dev \
......@@ -72,15 +74,13 @@ RUN apt-get update \
&& mkdir -p /usr/local/lib/R/site-library \
&& chown root:staff /usr/local/lib/R/site-library \
&& chmod g+ws /usr/local/lib/R/site-library \
## Fix library path
&& echo "R_LIBS_SITE=\${R_LIBS_SITE-'/usr/local/lib/R/site-library'}" >> /usr/local/lib/R/etc/Renviron.site \
## Set configured CRAN mirror
&& if [ -z "$BUILD_DATE" ]; then MRAN=$CRAN; \
else MRAN=https://mran.microsoft.com/snapshot/${BUILD_DATE}; fi \
&& echo MRAN=$MRAN >> /etc/environment \
&& echo MRAN=$MRAN >> /etc/environment \
&& echo "options(repos = c(CRAN='$MRAN'), download.file.method = 'libcurl')" >> /usr/local/lib/R/etc/Rprofile.site \
## Use littler installation scripts
&& Rscript -e "install.packages(c('littler', 'docopt'), repos = '$CRAN')" \
&& Rscript -e "install.packages(c('littler', 'docopt'), repos = '$MRAN')" \
&& ln -s /usr/local/lib/R/site-library/littler/examples/install2.r /usr/local/bin/install2.r \
&& ln -s /usr/local/lib/R/site-library/littler/examples/installGithub.r /usr/local/bin/installGithub.r \
&& ln -s /usr/local/lib/R/site-library/littler/bin/r /usr/local/bin/r \
......
......@@ -5,25 +5,34 @@ services:
variables:
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: "/certs"
R_VERSION: "4.2.0"
UPDATE_MODE: "false"
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- export VERSION_MAJ_MIN_PAT=`sed -n "s|.*r-ver:\([0-9]\.[0-9]\.[0-9]\).*|\1|p" rstudio/latest.Dockerfile`
- export VERSION_MAJ_MIN=`echo "${VERSION_MAJ_MIN_PAT:0:3}"`
- export VERSION_MAJ=`echo "${VERSION_MAJ_MIN_PAT:0:1}"`
- >
echo $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER
--password-stdin $CI_REGISTRY
- >
export VERSION_MAJ_MIN_PAT=$R_VERSION
export VERSION_MAJ_MIN=`echo $VERSION_MAJ_MIN_PAT |
sed -n "s|\([[:digit:]]\+\.[[:digit:]]\+\).*|\1|p"`
export VERSION_MAJ=`echo $VERSION_MAJ_MIN_PAT |
sed -n "s|\([[:digit:]]\+\).*|\1|p"`
build-latest:
stage: build
script:
- cd rstudio && docker build --pull -t $CI_REGISTRY_IMAGE:latest -f latest.Dockerfile .
- docker tag $CI_REGISTRY_IMAGE:latest $CI_REGISTRY_IMAGE:$VERSION_MAJ_MIN_PAT
- docker tag $CI_REGISTRY_IMAGE:latest $CI_REGISTRY_IMAGE:$VERSION_MAJ_MIN
- docker tag $CI_REGISTRY_IMAGE:latest $CI_REGISTRY_IMAGE:$VERSION_MAJ
- docker push $CI_REGISTRY_IMAGE:latest
- docker push $CI_REGISTRY_IMAGE:$VERSION_MAJ_MIN_PAT
- docker push $CI_REGISTRY_IMAGE:$VERSION_MAJ_MIN
- docker push $CI_REGISTRY_IMAGE:$VERSION_MAJ
- >
cd rstudio && docker build --pull
--build-arg R_VERSION
-t $CI_REGISTRY_IMAGE:latest
-t $CI_REGISTRY_IMAGE:$VERSION_MAJ_MIN_PAT
-t $CI_REGISTRY_IMAGE:$VERSION_MAJ_MIN
-t $CI_REGISTRY_IMAGE:$VERSION_MAJ
-f latest.Dockerfile .
- docker push -a $CI_REGISTRY_IMAGE
rules:
- if: $CI_COMMIT_BRANCH == "master" && $UPDATE_MODE != "true"
changes:
......@@ -32,12 +41,16 @@ build-latest:
build-version:
stage: build
script:
- cd rstudio && docker build --pull -t $CI_REGISTRY_IMAGE:4.1.3 -f 4.1.3.Dockerfile .
- docker push $CI_REGISTRY_IMAGE:4.1.3
- >
cd rstudio && docker build --pull
--build-arg R_VERSION
-t $CI_REGISTRY_IMAGE:$VERSION_MAJ_MIN_PAT
-f $R_VERSION.Dockerfile .
- docker push -a $CI_REGISTRY_IMAGE
rules:
- if: $CI_COMMIT_BRANCH == "freeze-version" && $UPDATE_MODE != "true"
- if: $CI_COMMIT_BRANCH == "freeze-version" && $CI_PIPELINE_TRIGGERED
changes:
- rstudio/4.1.3.Dockerfile
- rstudio/$R_VERSION.Dockerfile
trigger-latest-build:
stage: deploy
......@@ -59,6 +72,6 @@ trigger-version-build:
script:
- curl -X POST -F token=$ROCKER_TIDYVERSE -F ref=freeze-version https://gitlab.b-data.ch/api/v4/projects/186/trigger/pipeline
rules:
- if: $CI_COMMIT_BRANCH == "freeze-version" && $UPDATE_MODE != "true"
- if: $CI_COMMIT_BRANCH == "freeze-version" && $CI_PIPELINE_TRIGGERED
changes:
- rstudio/4.1.3.Dockerfile
- rstudio/$R_VERSION.Dockerfile
......@@ -52,19 +52,18 @@ Navigate to <http://localhost:8787> and you should be logged into RStudio as
the `rstudio` user without needing a password.
### Add shiny server on start up with `e ADD=shiny`
### Add shiny server
docker run -d -p 3838:3838 -p 8787:8787 -e ADD=shiny -e PASSWORD=yourpasswordhere rocker/rstudio
shiny server is now running on `localhost:3838` and RStudio on `localhost:8787`.
If you are building your own Dockerfiles on top of this stack, you should simply include the RUN command:
RUN /rocker_scripts/install_shiny_server.sh
Note: this triggers shiny install at runtime, which may require a few minutes to execute before services come up.
If you are building your own Dockerfiles on top of this stack, you should simply include the RUN command:
This works on any rocker-versioned image with R >= 4.0.0.
NOTE: older images tagged with R version 3.x.x will need to do:
RUN export ADD=shiny && bash /etc/cont-init.d/add
Then omit the `-e ADD=shiny` when running your image and shiny should be installed and waiting on port 3838.
Run your image and shiny should be installed and waiting on port 3838.
**Note**: Please see the `rocker/shiny` and `rocker/shiny-verse` images for
setting up a shiny server in a separate container from RStudio.
......
ARG IMAGE=debian:bullseye
ARG GIT_VERSION=2.35.1
ARG R_VERSION
ARG GIT_VERSION=2.36.1
ARG RSTUDIO_VERSION=2022.02.3+492
ARG S6_VERSION=v2.2.0.3
FROM registry.gitlab.b-data.ch/git/gsi/${GIT_VERSION}/${IMAGE} as gsi
FROM registry.gitlab.b-data.ch/r/r-ver:4.1.3
FROM registry.gitlab.b-data.ch/r/r-ver:${R_VERSION}
ARG DEBIAN_FRONTEND=noninteractive
ARG GIT_VERSION=2.35.1
ARG RSTUDIO_VERSION=2022.02.1+461
ARG S6_VERSION=v2.2.0.3
ARG GIT_VERSION
ARG RSTUDIO_VERSION
ARG S6_VERSION
ENV GIT_VERSION=${GIT_VERSION} \
RSTUDIO_VERSION=${RSTUDIO_VERSION} \
......@@ -21,7 +24,7 @@ COPY --from=gsi /usr/local /usr/local
COPY --from=gsi /etc/bash_completion.d /etc/bash_completion.d
## Download and install RStudio server & dependencies
## Attempts to get detect latest version, otherwise falls back to version given in $VER
## Attempts to detect latest version, otherwise falls back to $RSTUDIO_VERSION
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
curl \
......
......@@ -5,27 +5,35 @@ services:
variables:
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: "/certs"
R_VERSION: "4.2.0"
UPDATE_MODE: "false"
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- export VERSION_MAJ_MIN_PAT=`cat tidyverse/latest.Dockerfile | head -n1 | sed 's/.*\([0-9].[0-9].[0-9]\)/\1/'`
- export VERSION_MAJ_MIN=`echo "${VERSION_MAJ_MIN_PAT:0:3}"`
- export VERSION_MAJ=`echo "${VERSION_MAJ_MIN_PAT:0:1}"`
- >
echo $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER
--password-stdin $CI_REGISTRY
- >
export VERSION_MAJ_MIN_PAT=$R_VERSION
export VERSION_MAJ_MIN=`echo $VERSION_MAJ_MIN_PAT |
sed -n "s|\([[:digit:]]\+\.[[:digit:]]\+\).*|\1|p"`
export VERSION_MAJ=`echo $VERSION_MAJ_MIN_PAT |
sed -n "s|\([[:digit:]]\+\).*|\1|p"`
build-latest:
stage: build
script:
- >
cd tidyverse && docker build --pull --build-arg NCPUS=$((`nproc`/2+1))
-t $CI_REGISTRY_IMAGE:latest -f latest.Dockerfile .
- docker tag $CI_REGISTRY_IMAGE:latest $CI_REGISTRY_IMAGE:$VERSION_MAJ_MIN_PAT
- docker tag $CI_REGISTRY_IMAGE:latest $CI_REGISTRY_IMAGE:$VERSION_MAJ_MIN
- docker tag $CI_REGISTRY_IMAGE:latest $CI_REGISTRY_IMAGE:$VERSION_MAJ
- docker push $CI_REGISTRY_IMAGE:latest
- docker push $CI_REGISTRY_IMAGE:$VERSION_MAJ_MIN_PAT
- docker push $CI_REGISTRY_IMAGE:$VERSION_MAJ_MIN
- docker push $CI_REGISTRY_IMAGE:$VERSION_MAJ
docker build --pull
--build-arg R_VERSION
--build-arg NCPUS=$((`nproc`/2+1))
-t $CI_REGISTRY_IMAGE:latest
-t $CI_REGISTRY_IMAGE:$VERSION_MAJ_MIN_PAT
-t $CI_REGISTRY_IMAGE:$VERSION_MAJ_MIN
-t $CI_REGISTRY_IMAGE:$VERSION_MAJ
-f tidyverse/latest.Dockerfile .
- docker push -a $CI_REGISTRY_IMAGE
rules:
- if: $CI_COMMIT_BRANCH == "master" && $UPDATE_MODE != "true"
changes:
......@@ -35,13 +43,16 @@ build-version:
stage: build
script:
- >
cd tidyverse && docker build --pull --build-arg NCPUS=$((`nproc`/2+1))
-t $CI_REGISTRY_IMAGE:4.1.3 -f 4.1.3.Dockerfile .
- docker push $CI_REGISTRY_IMAGE:4.1.3
docker build --pull
--build-arg R_VERSION
--build-arg NCPUS=$((`nproc`/2+1))
-t $CI_REGISTRY_IMAGE:$VERSION_MAJ_MIN_PAT
-f tidyverse/$R_VERSION.Dockerfile .
- docker push -a $CI_REGISTRY_IMAGE
rules:
- if: $CI_COMMIT_BRANCH == "freeze-version" && $UPDATE_MODE != "true"
- if: $CI_COMMIT_BRANCH == "freeze-version" && $CI_PIPELINE_TRIGGERED
changes:
- tidyverse/4.1.3.Dockerfile
- tidyverse/$R_VERSION.Dockerfile
trigger-latest-build:
stage: deploy
......@@ -63,6 +74,6 @@ trigger-version-build:
script:
- curl -X POST -F token=$ROCKER_VERSE -F ref=freeze-version https://gitlab.b-data.ch/api/v4/projects/187/trigger/pipeline
rules:
- if: $CI_COMMIT_BRANCH == "freeze-version" && $UPDATE_MODE != "true"
- if: $CI_COMMIT_BRANCH == "freeze-version" && $CI_PIPELINE_TRIGGERED
changes:
- tidyverse/4.1.3.Dockerfile
- tidyverse/$R_VERSION.Dockerfile
FROM registry.gitlab.b-data.ch/rocker/rstudio:4.1.3
ARG R_VERSION
FROM registry.gitlab.b-data.ch/rocker/rstudio:${R_VERSION}
ARG NCPUS=1
......
......@@ -5,27 +5,35 @@ services:
variables:
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: "/certs"
R_VERSION: "4.2.0"
UPDATE_MODE: "false"
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- export VERSION_MAJ_MIN_PAT=`cat verse/latest.Dockerfile | head -n1 | sed 's/.*\([0-9].[0-9].[0-9]\)/\1/'`
- export VERSION_MAJ_MIN=`echo "${VERSION_MAJ_MIN_PAT:0:3}"`
- export VERSION_MAJ=`echo "${VERSION_MAJ_MIN_PAT:0:1}"`
- >
echo $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER
--password-stdin $CI_REGISTRY
- >
export VERSION_MAJ_MIN_PAT=$R_VERSION
export VERSION_MAJ_MIN=`echo $VERSION_MAJ_MIN_PAT |
sed -n "s|\([[:digit:]]\+\.[[:digit:]]\+\).*|\1|p"`
export VERSION_MAJ=`echo $VERSION_MAJ_MIN_PAT |
sed -n "s|\([[:digit:]]\+\).*|\1|p"`
build-latest:
stage: build
script:
- >
cd verse && docker build --pull --build-arg NCPUS=$((`nproc`/2+1))
-t $CI_REGISTRY_IMAGE:latest -f latest.Dockerfile .
- docker tag $CI_REGISTRY_IMAGE:latest $CI_REGISTRY_IMAGE:$VERSION_MAJ_MIN_PAT
- docker tag $CI_REGISTRY_IMAGE:latest $CI_REGISTRY_IMAGE:$VERSION_MAJ_MIN
- docker tag $CI_REGISTRY_IMAGE:latest $CI_REGISTRY_IMAGE:$VERSION_MAJ
- docker push $CI_REGISTRY_IMAGE:latest
- docker push $CI_REGISTRY_IMAGE:$VERSION_MAJ_MIN_PAT
- docker push $CI_REGISTRY_IMAGE:$VERSION_MAJ_MIN
- docker push $CI_REGISTRY_IMAGE:$VERSION_MAJ
docker build --pull
--build-arg R_VERSION
--build-arg NCPUS=$((`nproc`/2+1))
-t $CI_REGISTRY_IMAGE:latest
-t $CI_REGISTRY_IMAGE:$VERSION_MAJ_MIN_PAT
-t $CI_REGISTRY_IMAGE:$VERSION_MAJ_MIN
-t $CI_REGISTRY_IMAGE:$VERSION_MAJ
-f verse/latest.Dockerfile .
- docker push -a $CI_REGISTRY_IMAGE
rules:
- if: $CI_COMMIT_BRANCH == "master" && $UPDATE_MODE != "true"
changes:
......@@ -35,13 +43,16 @@ build-version:
stage: build
script:
- >
cd verse && docker build --pull --build-arg NCPUS=$((`nproc`/2+1))
-t $CI_REGISTRY_IMAGE:4.1.3 -f 4.1.3.Dockerfile .
- docker push $CI_REGISTRY_IMAGE:4.1.3
docker build --pull
--build-arg R_VERSION
--build-arg NCPUS=$((`nproc`/2+1))
-t $CI_REGISTRY_IMAGE:$VERSION_MAJ_MIN_PAT
-f verse/$R_VERSION.Dockerfile .
- docker push -a $CI_REGISTRY_IMAGE
rules:
- if: $CI_COMMIT_BRANCH == "freeze-version" && $UPDATE_MODE != "true"
- if: $CI_COMMIT_BRANCH == "freeze-version" && $CI_PIPELINE_TRIGGERED
changes:
- verse/4.1.3.Dockerfile
- verse/$R_VERSION.Dockerfile
trigger-latest-build:
stage: deploy
......@@ -63,6 +74,6 @@ trigger-version-build:
script:
- curl -X POST -F token=$ROCKER_GEOSPATIAL -F ref=freeze-version https://gitlab.b-data.ch/api/v4/projects/188/trigger/pipeline
rules:
- if: $CI_COMMIT_BRANCH == "freeze-version" && $UPDATE_MODE != "true"
- if: $CI_COMMIT_BRANCH == "freeze-version" && $CI_PIPELINE_TRIGGERED
changes:
- verse/4.1.3.Dockerfile
- verse/$R_VERSION.Dockerfile
FROM registry.gitlab.b-data.ch/rocker/tidyverse:4.1.3
ARG R_VERSION
ARG CTAN_REPO=https://mirror.ctan.org/systems/texlive/tlnet
FROM registry.gitlab.b-data.ch/rocker/tidyverse:${R_VERSION}
ARG NCPUS=1
ARG DEBIAN_FRONTEND=noninteractive
ARG CTAN_REPO=${CTAN_REPO:-https://mirror.ctan.org/systems/texlive/tlnet}
ENV CTAN_REPO=${CTAN_REPO}
ARG CTAN_REPO
ENV PATH=/opt/TinyTeX/bin/x86_64-linux:$PATH
ENV CTAN_REPO=${CTAN_REPO} \
PATH=/opt/TinyTeX/bin/linux:$PATH
## Add LaTeX, rticles and bookdown support
RUN wget "https://travis-bin.yihui.name/texlive-local.deb" \
......@@ -57,11 +60,15 @@ RUN wget "https://travis-bin.yihui.name/texlive-local.deb" \
&& wget -qO- "https://yihui.org/tinytex/install-unx.sh" \
| sh -s - --admin --no-path \
&& mv ~/.TinyTeX /opt/TinyTeX \
&& /opt/TinyTeX/bin/*/tlmgr path add \
&& ln -rs /opt/TinyTeX/bin/$(uname -m)-linux \
/opt/TinyTeX/bin/linux \
&& /opt/TinyTeX/bin/linux/tlmgr path add \
&& tlmgr update --self \
&& tlmgr install \
ae \
cm-super \
context \
dvipng \
listings \
makeindex \
parskip \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment