-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/crukci-bioinformatics/rascal
- Loading branch information
Showing
1 changed file
with
37 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,38 +2,61 @@ FROM debian:buster-20210511-slim | |
|
||
MAINTAINER Matt Eldridge "[email protected]" | ||
|
||
ARG DEBIAN_FRONTEND=noninteractive | ||
|
||
RUN apt-get update | ||
RUN apt-get install -y apt-utils | ||
|
||
# update locale | ||
RUN apt-get install -y locales | ||
RUN sed -i 's/^# en_GB/en_GB/' /etc/locale.gen | ||
RUN locale-gen | ||
|
||
# install packages and libraries needed to build/install Shiny server, R and | ||
# R packages/dependencies | ||
RUN apt-get install -y build-essential | ||
RUN apt-get install -y libxml2-dev | ||
RUN apt-get install -y libssl-dev | ||
RUN apt-get install -y libreadline7 | ||
RUN apt-get install -y libcurl4-openssl-dev | ||
RUN apt-get install -y curl | ||
RUN apt-get install -y gdebi-core | ||
RUN apt-get clean | ||
|
||
# install R | ||
ARG R_VERSION=4.1.0 | ||
RUN curl -O https://cdn.rstudio.com/r/debian-10/pkgs/r-${R_VERSION}_1_amd64.deb | ||
RUN gdebi -n r-${R_VERSION}_1_amd64.deb | ||
RUN rm r-${R_VERSION}_1_amd64.deb | ||
RUN ln -s /opt/R/${R_VERSION}/bin/R /usr/local/bin/R | ||
RUN ln -s /opt/R/${R_VERSION}/bin/Rscript /usr/local/bin/Rscript | ||
|
||
# install Shiny server | ||
ARG SHINY_SERVER_VERSION=1.5.16.958-amd64 | ||
RUN curl -O https://download3.rstudio.org/ubuntu-14.04/x86_64/shiny-server-${SHINY_SERVER_VERSION}.deb | ||
RUN gdebi -n shiny-server-${SHINY_SERVER_VERSION}.deb | ||
RUN rm shiny-server-${SHINY_SERVER_VERSION}.deb | ||
|
||
# expose port that Shiny server listens on (can be mapped to another port on the host) | ||
EXPOSE 3838 | ||
|
||
# ensure the user account that is running the shiny server process has write privilege for /var/lib/shiny-server | ||
RUN chmod ugo+rwx /var/lib/shiny-server | ||
|
||
# command to run when starting the container using 'docker run' | ||
CMD exec shiny-server >> /var/log/shiny-server/shiny-server.log 2>&1 | ||
|
||
# install R | ||
RUN apt-key adv --keyserver keys.gnupg.net --recv-key E19F5F87128899B192B1A2C2AD5F960A256A04AF | ||
RUN echo 'deb http://cloud.r-project.org/bin/linux/debian buster-cran40/' >> /etc/apt/sources.list | ||
RUN apt-get update | ||
RUN apt-get install -y -t buster-cran40 r-base | ||
|
||
# update pre-installed R packages | ||
RUN R -e 'update.packages(ask = FALSE)' | ||
|
||
# install R packages | ||
RUN R -e 'install.packages("shiny", repos = "https://cloud.r-project.org")' | ||
RUN R -e 'install.packages("tidyverse", repos = "https://cloud.r-project.org")' | ||
RUN R -e 'install.packages("DT", repos = "https://cloud.r-project.org")' | ||
RUN R -e 'install.packages("shinyjs", repos = "https://cloud.r-project.org")' | ||
RUN R -e 'install.packages("colourpicker", repos = "https://cloud.r-project.org")' | ||
RUN R -e 'install.packages("tidyverse")' | ||
RUN R -e 'install.packages("optparse")' | ||
RUN R -e 'install.packages("shiny")' | ||
RUN R -e 'install.packages("shinyjs")' | ||
RUN R -e 'install.packages("colourpicker")' | ||
RUN R -e 'install.packages("DT")' | ||
|
||
# install Bioconductor packages | ||
RUN R -e 'install.packages("BiocManager", repos = "https://cloud.r-project.org")' | ||
RUN R -e 'install.packages("BiocManager")' | ||
RUN R -e 'BiocManager::install("Biobase")' | ||
RUN R -e 'BiocManager::install("QDNAseq")' | ||
|
||
|
@@ -46,12 +69,3 @@ RUN R CMD INSTALL /opt/rascal_${RASCAL_VERSION}.tgz | |
RUN tar zxf /opt/rascal_${RASCAL_VERSION}.tgz -C /opt | ||
RUN ln -s /opt/rascal/shiny /srv/shiny-server/rascal | ||
|
||
# ensure the user account that is running the shiny server process has write privilege for /var/lib/shiny-server | ||
RUN chmod ugo+rwx /var/lib/shiny-server | ||
|
||
# expose port that Shiny server listens on (can be mapped to another port on the host) | ||
EXPOSE 3838 | ||
|
||
# command to run when starting the container using 'docker run' | ||
CMD exec shiny-server >> /var/log/shiny-server/shiny-server.log 2>&1 | ||
|