Commit eeeb82be authored by Olivier Benz's avatar Olivier Benz
Browse files

Merge branch 'freeze-version'

parents 539fdefc 57a8bd5c
......@@ -32,9 +32,9 @@ build-latest:
build-version:
stage: build
script:
- cd geospatial && docker build --pull -t $CI_REGISTRY_IMAGE:4.1.0 -f 4.1.0.Dockerfile .
- docker push $CI_REGISTRY_IMAGE:4.1.0
- cd geospatial && docker build --pull -t $CI_REGISTRY_IMAGE:4.1.1 -f 4.1.1.Dockerfile .
- docker push $CI_REGISTRY_IMAGE:4.1.1
rules:
- if: $CI_COMMIT_BRANCH == "freeze-version" && $R_VERSION_UPDATE != "true"
changes:
- geospatial/4.1.0.Dockerfile
- geospatial/4.1.1.Dockerfile
FROM registry.gitlab.b-data.ch/rocker/verse:4.1.1
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
libfftw3-dev \
libgdal-dev \
libgeos-dev \
libgsl0-dev \
libgl1-mesa-dev \
libglu1-mesa-dev \
libhdf4-alt-dev \
libhdf5-dev \
libjq-dev \
libpq-dev \
libproj-dev \
libprotobuf-dev \
libnetcdf-dev \
libsqlite3-dev \
libssl-dev \
libudunits2-dev \
netcdf-bin \
postgis \
protobuf-compiler \
sqlite3 \
tk-dev \
unixodbc-dev \
&& install2.r --error \
RColorBrewer \
RandomFields \
RNetCDF \
classInt \
deldir \
gstat \
hdf5r \
lidR \
mapdata \
maptools \
mapview \
ncdf4 \
proj4 \
raster \
rgdal \
rgeos \
rlas \
sf \
sp \
spacetime \
spatstat \
spdep \
geoR \
geosphere \
## from bioconductor
&& R -e "BiocManager::install('rhdf5', update = FALSE, ask = FALSE)" \
## Clean up
&& rm -rf /tmp/* \
&& rm -rf /var/lib/apt/lists/*
......@@ -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.0}
export CI_APP_TAG=${CI_APP_TAG:-4.1.1}
else
export CI_APP_TAG=${CI_APP_TAG:-$CI_COMMIT_SHA}
fi
......@@ -89,7 +89,7 @@ build:version-linux-amd64:
rules:
- if: $CI_COMMIT_BRANCH == "freeze-version" && $CI_BUILD_PLATFORMS =~ /(linux\/amd64)/
changes:
- r-ver/4.1.0.Dockerfile
- r-ver/4.1.1.Dockerfile
build:version-linux-arm64v8:
extends: .build
......@@ -104,7 +104,7 @@ build:version-linux-arm64v8:
rules:
- if: $CI_COMMIT_BRANCH == "freeze-version" && $CI_BUILD_PLATFORMS =~ /(linux\/arm64\/v8)/
changes:
- r-ver/4.1.0.Dockerfile
- r-ver/4.1.1.Dockerfile
build-manifest:latest-linux-multiarch:
extends: .build
......@@ -165,7 +165,7 @@ build-manifest:version-linux-multiarch:
rules:
- if: $CI_COMMIT_BRANCH == "freeze-version"
changes:
- r-ver/4.1.0.Dockerfile
- r-ver/4.1.1.Dockerfile
trigger-latest-build-foreign:
extends: .build
......@@ -202,4 +202,4 @@ trigger-version-build:
rules:
- if: $CI_COMMIT_BRANCH == "freeze-version"
changes:
- r-ver/4.1.0.Dockerfile
- r-ver/4.1.1.Dockerfile
ARG IMAGE=debian:bullseye
ARG R_VERSION=4.1.1
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.vendor="b-data GmbH" \
org.opencontainers.image.authors="Olivier Benz <olivier.benz@b-data.ch>"
ARG IMAGE=debian:bullseye
ARG DEBIAN_FRONTEND=noninteractive
ARG LAPACK=libopenblas-dev
ARG R_VERSION=4.1.1
ARG BUILD_DATE
ARG CRAN=https://cran.rstudio.com
ENV BASE_IMAGE=${IMAGE} \
BUILD_DATE=${BUILD_DATE:-2021-11-01} \
R_VERSION=${R_VERSION} \
CRAN=${CRAN} \
LANG=en_US.UTF-8 \
TERM=xterm \
TZ=Etc/UTC
COPY --from=rsi /usr/local /usr/local
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
bash-completion \
build-essential \
ca-certificates \
devscripts \
file \
fonts-texgyre \
g++ \
gfortran \
gsfonts \
libblas-dev \
libbz2-dev \
'^libcurl[3|4]$' \
libicu-dev \
'^libjpeg.*-turbo.*-dev$' \
liblzma-dev \
${LAPACK} \
libpangocairo-* \
libpaper-utils \
'^libpcre[2|3]-dev$' \
libpng-dev \
libreadline-dev \
libtiff* \
locales \
pkg-config \
unzip \
zip \
zlib1g \
## Update locale
&& sed -i "s/# $LANG/$LANG/g" /etc/locale.gen \
&& locale-gen \
&& update-locale LANG=$LANG \
## Add a library directory (for user-installed packages)
&& 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 \
## 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 "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'), repo = '$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 \
## Clean up
&& rm -rf /tmp/* \
&& rm -rf /var/lib/apt/lists/*
CMD ["R"]
......@@ -32,12 +32,12 @@ build-latest:
build-version:
stage: build
script:
- cd rstudio && docker build --pull -t $CI_REGISTRY_IMAGE:4.1.0 -f 4.1.0.Dockerfile .
- docker push $CI_REGISTRY_IMAGE:4.1.0
- cd rstudio && docker build --pull -t $CI_REGISTRY_IMAGE:4.1.1 -f 4.1.1.Dockerfile .
- docker push $CI_REGISTRY_IMAGE:4.1.1
rules:
- if: $CI_COMMIT_BRANCH == "freeze-version" && $R_VERSION_UPDATE != "true"
changes:
- rstudio/4.1.0.Dockerfile
- rstudio/4.1.1.Dockerfile
trigger-latest-build:
stage: deploy
......@@ -61,4 +61,4 @@ trigger-version-build:
rules:
- if: $CI_COMMIT_BRANCH == "freeze-version" && $R_VERSION_UPDATE != "true"
changes:
- rstudio/4.1.0.Dockerfile
- rstudio/4.1.1.Dockerfile
ARG BASE_IMAGE=debian:bullseye
ARG GIT_VERSION=2.33.1
FROM registry.gitlab.b-data.ch/git/gsi/${GIT_VERSION}/${BASE_IMAGE} as gsi
FROM registry.gitlab.b-data.ch/r/r-ver:4.1.1
ARG DEBIAN_FRONTEND=noninteractive
ARG RSTUDIO_VERSION=2021.09.0-351
ARG S6_VERSION=v1.21.7.0
ARG GIT_VERSION=2.33.1
ARG PANDOC_TEMPLATES_VERSION=2.14.1
ENV RSTUDIO_VERSION=${RSTUDIO_VERSION}
ENV PATH=/usr/lib/rstudio-server/bin:$PATH
ENV S6_VERSION=${S6_VERSION}
ENV S6_BEHAVIOUR_IF_STAGE2_FAILS=2
ENV GIT_VERSION=${GIT_VERSION}
ENV PANDOC_TEMPLATES_VERSION=${PANDOC_TEMPLATES_VERSION}
COPY --from=gsi /usr/local /usr/local
## Download and install RStudio server & dependencies
## Attempts to get detect latest version, otherwise falls back to version given in $VER
## Symlink pandoc, pandoc-citeproc so they are available system-wide
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
curl \
file \
libapparmor1 \
libclang-dev \
libcurl4-openssl-dev \
libedit2 \
libpq-dev \
libssl-dev \
lsb-release \
nano \
psmisc \
procps \
python-setuptools \
sudo \
wget \
## Additional git runtime dependencies
libcurl3-gnutls \
liberror-perl \
## Additional git runtime recommendations
less \
ssh-client \
&& if [ -z "$RSTUDIO_VERSION" ]; \
then RSTUDIO_URL="https://www.rstudio.org/download/latest/stable/server/bionic/rstudio-server-latest-amd64.deb"; \
else RSTUDIO_URL="http://download2.rstudio.org/server/bionic/amd64/rstudio-server-${RSTUDIO_VERSION}-amd64.deb"; fi \
&& wget -q $RSTUDIO_URL \
&& dpkg -i rstudio-server-*-amd64.deb \
&& rm rstudio-server-*-amd64.deb \
## https://github.com/rocker-org/rocker-versioned2/issues/137
rm -f /var/lib/rstudio-server/secure-cookie-key \
## Symlink pandoc & standard pandoc templates for use system-wide
&& ln -s /usr/lib/rstudio-server/bin/pandoc/pandoc /usr/local/bin \
&& ln -s /usr/lib/rstudio-server/bin/pandoc/pandoc-citeproc /usr/local/bin \
&& git clone --recursive --branch ${PANDOC_TEMPLATES_VERSION} https://github.com/jgm/pandoc-templates \
&& rm -rf /opt/pandoc/templates \
&& mkdir -p /opt/pandoc/templates \
&& cp -r pandoc-templates*/* /opt/pandoc/templates && rm -rf pandoc-templates* \
&& rm -rf /root/.pandoc \
&& mkdir /root/.pandoc && ln -s /opt/pandoc/templates /root/.pandoc/templates \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
## RStudio wants an /etc/R, will populate from $R_HOME/etc
&& mkdir -p /etc/R \
## Need to configure non-root user for RStudio
&& useradd rstudio \
&& echo "rstudio:rstudio" | chpasswd \
&& mkdir /home/rstudio \
&& chown rstudio:rstudio /home/rstudio \
&& addgroup rstudio staff \
## Prevent rstudio from deciding to use /usr/bin/R if a user apt-get installs a package
&& echo 'rsession-which-r=/usr/local/bin/R' >> /etc/rstudio/rserver.conf \
## use more robust file locking to avoid errors when using shared volumes:
&& echo 'lock-type=advisory' >> /etc/rstudio/file-locks \
## Set default branch name to main
&& git config --system init.defaultBranch main \
## Store passwords for one hour in memory
&& git config --system credential.helper "cache --timeout=3600" \
## Merge the default branch from the default remote when "git pull" is run
&& git config --system pull.rebase false \
# Push the current branch with the same name on the remote
&& git config --system push.default simple \
## Set up S6 init system
&& wget -P /tmp/ https://github.com/just-containers/s6-overlay/releases/download/${S6_VERSION}/s6-overlay-amd64.tar.gz \
&& tar xzf /tmp/s6-overlay-amd64.tar.gz -C / \
&& mkdir -p /etc/services.d/rstudio \
&& echo '#!/usr/bin/with-contenv bash \
\n## load /etc/environment vars first: \
\nfor line in $( cat /etc/environment ) ; do export $line > /dev/null; done \
\nexec /usr/lib/rstudio-server/bin/rserver --server-daemonize 0' \
> /etc/services.d/rstudio/run \
&& echo '#!/bin/bash \
\nrstudio-server stop' \
> /etc/services.d/rstudio/finish \
&& echo '[*] \
\nlog-level=warn \
\nlogger-type=stderr' \
> /etc/rstudio/logging.conf \
&& mkdir -p /home/rstudio/.rstudio/monitored/user-settings \
&& echo 'alwaysSaveHistory="0" \
\nloadRData="0" \
\nsaveAction="0"' \
> /home/rstudio/.rstudio/monitored/user-settings/user-settings \
&& chown -R rstudio:rstudio /home/rstudio/.rstudio
COPY userconf.sh /etc/cont-init.d/userconf
## running with "-e ADD=shiny" adds shiny server
COPY add_shiny.sh /etc/cont-init.d/add
COPY disable_auth_rserver.conf /etc/rstudio/disable_auth_rserver.conf
COPY pam-helper.sh /usr/lib/rstudio-server/bin/pam-helper
EXPOSE 8787
CMD ["/init"]
......@@ -32,12 +32,12 @@ build-latest:
build-version:
stage: build
script:
- cd tidyverse && docker build --pull -t $CI_REGISTRY_IMAGE:4.1.0 -f 4.1.0.Dockerfile .
- docker push $CI_REGISTRY_IMAGE:4.1.0
- cd tidyverse && docker build --pull -t $CI_REGISTRY_IMAGE:4.1.1 -f 4.1.1.Dockerfile .
- docker push $CI_REGISTRY_IMAGE:4.1.1
rules:
- if: $CI_COMMIT_BRANCH == "freeze-version" && $R_VERSION_UPDATE != "true"
changes:
- tidyverse/4.1.0.Dockerfile
- tidyverse/4.1.1.Dockerfile
trigger-latest-build:
stage: deploy
......@@ -61,4 +61,4 @@ trigger-version-build:
rules:
- if: $CI_COMMIT_BRANCH == "freeze-version" && $R_VERSION_UPDATE != "true"
changes:
- tidyverse/4.1.0.Dockerfile
- tidyverse/4.1.1.Dockerfile
FROM registry.gitlab.b-data.ch/rocker/rstudio:4.1.1
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update -qq && apt-get -y --no-install-recommends install \
libxml2-dev \
libcairo2-dev \
libsqlite3-dev \
libmariadbd-dev \
libssh2-1-dev \
unixodbc-dev \
libsasl2-dev \
libtiff-dev \
libharfbuzz-dev \
libfribidi-dev \
libgit2-dev \
&& install2.r --error BiocManager \
&& install2.r --error \
--deps TRUE \
tidyverse \
dplyr \
devtools \
formatR \
remotes \
selectr \
caTools \
## Clean up
&& rm -rf /tmp/* \
&& rm -rf /var/lib/apt/lists/*
......@@ -32,12 +32,12 @@ build-latest:
build-version:
stage: build
script:
- cd verse && docker build --pull -t $CI_REGISTRY_IMAGE:4.1.0 -f 4.1.0.Dockerfile .
- docker push $CI_REGISTRY_IMAGE:4.1.0
- cd verse && docker build --pull -t $CI_REGISTRY_IMAGE:4.1.1 -f 4.1.1.Dockerfile .
- docker push $CI_REGISTRY_IMAGE:4.1.1
rules:
- if: $CI_COMMIT_BRANCH == "freeze-version" && $R_VERSION_UPDATE != "true"
changes:
- verse/4.1.0.Dockerfile
- verse/4.1.1.Dockerfile
trigger-latest-build:
stage: deploy
......@@ -61,4 +61,4 @@ trigger-version-build:
rules:
- if: $CI_COMMIT_BRANCH == "freeze-version" && $R_VERSION_UPDATE != "true"
changes:
- verse/4.1.0.Dockerfile
- verse/4.1.1.Dockerfile
FROM registry.gitlab.b-data.ch/rocker/tidyverse:4.1.1
ARG DEBIAN_FRONTEND=noninteractive
ARG CTAN_REPO=${CTAN_REPO:-http://mirror.ctan.org/systems/texlive/tlnet}
ENV CTAN_REPO=${CTAN_REPO}
ENV PATH=/opt/TinyTeX/bin/x86_64-linux:$PATH
## Add LaTeX, rticles and bookdown support
RUN wget "https://travis-bin.yihui.name/texlive-local.deb" \
&& dpkg -i texlive-local.deb \
&& rm texlive-local.deb \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
cargo \
curl \
default-jdk \
fonts-roboto \
ghostscript \
lbzip2 \
libbz2-dev \
libgl1-mesa-dev \
libglu1-mesa-dev \
libicu-dev \
liblzma-dev \
libhunspell-dev \
libmagick++-dev \
libopenmpi-dev \
libpcre2-dev \
libpoppler-cpp-dev \
# librdf0-dev depends on libcurl4-gnutls-dev
librdf0-dev \
libnode-dev \
libzmq3-dev \
qpdf \
texinfo \
vim \
## Install R package redland
&& install2.r --error --skipinstalled redland \
## Explicitly install runtime library sub-deps of librdf0-dev
&& apt-get install -y \
libcurl4-openssl-dev \
libxslt-dev \
librdf0 \
redland-utils \
rasqal-utils \
raptor2-utils \
## Get rid of librdf0-dev and its dependencies (incl. libcurl4-gnutls-dev)
&& apt-get -y autoremove \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
## Admin-based install of TinyTeX:
&& wget -qO- "https://yihui.org/tinytex/install-unx.sh" \
| sh -s - --admin --no-path \
&& mv ~/.TinyTeX /opt/TinyTeX \
&& /opt/TinyTeX/bin/*/tlmgr path add \
&& tlmgr update --self \
&& tlmgr install \
ae \
context \
listings \
makeindex \
parskip \
pdfcrop \
&& tlmgr path add \
&& Rscript -e "tinytex::r_texmf()" \
&& chown -R root:staff /opt/TinyTeX \
&& chmod -R g+w /opt/TinyTeX \
&& chmod -R g+wx /opt/TinyTeX/bin \
&& echo "PATH=${PATH}" >> /usr/local/lib/R/etc/Renviron \
&& install2.r --error PKI \
## And some nice R packages for publishing-related stuff
&& install2.r --error --deps TRUE \
blogdown bookdown rticles rmdshower rJava xaringan \
## Clean up
&& rm -rf /tmp/*
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment