Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Patricie34 authored Aug 1, 2024
1 parent cecb179 commit 6d37e1b
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions rdocker/Dockerfile
Original file line number Diff line number Diff line change
@@ -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 \
Expand All @@ -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

0 comments on commit 6d37e1b

Please sign in to comment.