### ### R base image ### Based on r-ver ### FROM debian:buster AS rver LABEL org.label-schema.license="GPL-2.0" \ org.label-schema.vcs-url="https://github.com/rocker-org/rocker-versioned" \ org.label-schema.vendor="Rocker Project" \ maintainer="Carl Boettiger " ARG R_VERSION ARG BUILD_DATE ARG CRAN ENV BUILD_DATE ${BUILD_DATE:-2020-04-24} ENV R_VERSION=${R_VERSION:-3.6.3} \ CRAN=${CRAN:-https://cran.r-project.org} \ LC_ALL=en_US.UTF-8 \ LANG=en_US.UTF-8 \ TERM=xterm RUN <> /etc/locale.gen locale-gen en_US.utf8 /usr/sbin/update-locale LANG=en_US.UTF-8 BUILDDEPS="curl \ default-jdk \ libbz2-dev \ libcairo2-dev \ libcurl4-openssl-dev \ libpango1.0-dev \ libjpeg-dev \ libicu-dev \ libpcre3-dev \ libpng-dev \ libreadline-dev \ libtiff5-dev \ liblzma-dev \ libx11-dev \ libxt-dev \ perl \ tcl8.6-dev \ tk8.6-dev \ texinfo \ texlive-extra-utils \ texlive-fonts-recommended \ texlive-fonts-extra \ texlive-latex-recommended \ x11proto-core-dev \ xauth \ xfonts-base \ xvfb \ zlib1g-dev" apt-get install -y --no-install-recommends $BUILDDEPS ## Download source code curl -O https://cran.r-project.org/src/base/R-3/R-${R_VERSION}.tar.gz ## Extract source code tar -xf R-${R_VERSION}.tar.gz cd R-${R_VERSION} ## Set compiler flags R_PAPERSIZE=letter \ R_BATCHSAVE="--no-save --no-restore" R_BROWSER=xdg-open PAGER=/usr/bin/pager PERL=/usr/bin/perl R_UNZIPCMD=/usr/bin/unzip R_ZIPCMD=/usr/bin/zip R_PRINTCMD=/usr/bin/lpr LIBnn=lib AWK=/usr/bin/awk CFLAGS="-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g" CXXFLAGS="-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g" ## Configure options ./configure --enable-R-shlib \ --enable-memory-profiling \ --with-readline \ --with-blas \ --with-tcltk \ --disable-nls \ --with-recommended-packages \ --prefix /usr/local ## Build and install make -j $(nproc) -O make install ## 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 sed -i '/^R_LIBS_USER=.*$/d' /usr/local/lib/R/etc/Renviron echo "R_LIBS_USER=\${R_LIBS_USER-'/usr/local/lib/R/site-library'}" >> /usr/local/lib/R/etc/Renviron echo "R_LIBS=\${R_LIBS-'/usr/local/lib/R/site-library:/usr/local/lib/R/library:/usr/lib/R/library'}" >> /usr/local/lib/R/etc/Renviron echo "options(repos = c(CRAN='$CRAN'), download.file.method = 'libcurl')" >> /usr/local/lib/R/etc/Rprofile.site ## Clean up from R source install apt-get remove --purge -y $BUILDDEPS apt-get autoremove -y apt-get autoclean -y rm -rf /var/lib/apt/lists/* END_RUN_CMD ### ### Added Bioconductor packages to r-ver ### FROM rver as bioconductor RUN <