Skip to content
Snippets Groups Projects
Dockerfile 2.28 KiB
Newer Older
FROM rocker/r-ver:4.2.2
LABEL version="0.14" 
LABEL maintainer="Théophile Sanchez <theophile.sanchez@wsl.ch>"

ENV S6_VERSION=v2.1.0.2
ENV RSTUDIO_VERSION=daily
ENV DEFAULT_USER=rstudio
ENV PANDOC_VERSION=default
ENV PATH=/usr/lib/rstudio-server/bin:$PATH

# install base packages
RUN apt-get update -y
RUN apt-get install -y build-essential
RUN apt-get install -y wget htop vim nano man cmake git

# install python 
RUN apt-get install -y python2
RUN apt-get install -y python3
RUN apt-get install -y python3-pip
RUN wget https://bootstrap.pypa.io/pip/2.7/get-pip.py
RUN python2 get-pip.py

# dependencies
RUN apt-get update -y
RUN apt-get install -y mc zlib1g zlib1g-dev libghc-bzlib-dev liblzma-dev libxml2 libxml2-dev libigraph-dev autoconf
RUN /rocker_scripts/install_rstudio.sh
RUN /rocker_scripts/install_pandoc.sh
RUN R -e "install.packages('tidyverse')"
RUN R -e "install.packages('BiocManager')"
RUN R -e "BiocManager::install('ShortRead')"
RUN R -e "BiocManager::install('Biostrings')"
RUN R -e "BiocManager::install('phyloseq')"
RUN R -e "BiocManager::install('dada2')"
RUN R -e "install.packages('devtools')"
RUN R -e "devtools::install_url(https://cran.r-project.org/src/contrib/Archive/PhyloMeasures/PhyloMeasures_2.1.tar.gz)"
RUN R -e "install.packages('ape')"
RUN R -e "install.packages('mFD')"
RUN R -e "install.packages('worrms')"
RUN R -e "install.packages('patchwork')"
RUN R -e "install.packages('hillR')"
RUN R -e "install.packages('betapart')"
SANCHEZ Theophile's avatar
SANCHEZ Theophile committed

# download sources
SANCHEZ Theophile's avatar
SANCHEZ Theophile committed
WORKDIR /app
SANCHEZ Theophile's avatar
SANCHEZ Theophile committed
RUN wget https://gitlab.mbb.cnrs.fr/edna/custom_reference_database/-/archive/v1.1/custom_reference_database-v1.1.tar.gz
RUN tar -zxvf custom_reference_database-v1.1.tar.gz
SANCHEZ Theophile's avatar
SANCHEZ Theophile committed
RUN wget https://github.com/torognes/vsearch/archive/v2.22.1.tar.gz
RUN tar -zxvf v2.22.1.tar.gz

# install cutadapt
RUN python3 -m pip install --upgrade cutadapt

# install MKBDR
WORKDIR /app/custom_reference_database-v1.1
RUN pip3 install .

# install vsearch
WORKDIR /app/vsearch-2.22.1
RUN ./autogen.sh
RUN ./configure CFLAGS="-O3" CXXFLAGS="-O3"
RUN make
RUN make install 

# install ecoPCR
RUN apt-get install -y ecopcr
WORKDIR /app
RUN rm *.tar.gz* 
RUN rm -rf /var/lib/apt/lists/* 
WORKDIR /home/rstudio

EXPOSE 8787
CMD ["/init"]
ENV USER="rstudio" PASSWORD="rstudio" ROOT="TRUE"