From 6d37e1b7041603b143a0425fb5878a861b9faa40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patricie=20Skal=C3=A1kov=C3=A1?= <158295213+Patricie34@users.noreply.github.com> Date: Thu, 1 Aug 2024 10:35:10 +0200 Subject: [PATCH] Update Dockerfile --- rdocker/Dockerfile | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/rdocker/Dockerfile b/rdocker/Dockerfile index c8d09fe..43a69bf 100644 --- a/rdocker/Dockerfile +++ b/rdocker/Dockerfile @@ -1,7 +1,7 @@ # Use the official Ubuntu image as the base FROM ubuntu:20.04 -# Install system dependencies and R +# Install system dependencies RUN apt-get update && apt-get install -y \ libcurl4-openssl-dev \ libxml2-dev \ @@ -12,12 +12,22 @@ RUN apt-get update && apt-get install -y \ libgmp-dev \ libgit2-dev \ gfortran \ - && apt-get install -y --no-install-recommends r-base \ + software-properties-common \ && rm -rf /var/lib/apt/lists/* -# Install R packages from CRAN and Bioconductor -RUN R -e "install.packages(c('ggplot2', 'scales', 'gtable', 'grid'), repos='http://cran.rstudio.com/')" \ - && R -e "if (!require('BiocManager', quietly = TRUE)) install.packages('BiocManager'); BiocManager::install('DNAcopy', update = TRUE, ask = FALSE)" +# Add CRAN repository and install R base version 4.4.0 +RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9 \ + && add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/' \ + && apt-get update \ + && apt-get install -y --no-install-recommends r-base=4.4.0-1.2004.0 \ + && rm -rf /var/lib/apt/lists/* + +# Install R packages from CRAN +RUN R -e "install.packages(c('ggplot2', 'scales', 'gtable', 'grid'), repos='http://cran.rstudio.com/')" + +# Install Bioconductor and DNAcopy package +RUN R -e "install.packages('BiocManager', repos='http://cran.rstudio.com/')" \ + && R -e "BiocManager::install('DNAcopy', update = TRUE, ask = FALSE)" # Set the working directory (optional) WORKDIR /app