Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Start from an image containing R
- FROM r-base:latest
- # Install dependencies
- RUN apt-get update && apt-get install -y
- sudo
- gdebi-core
- pandoc
- pandoc-citeproc
- libcurl4-gnutls-dev
- libcairo2-dev/unstable
- libxt-dev
- libssl-dev
- gsl-bin
- libgsl0-dev
- default-jdk
- RUN wget --no-verbose https://s3.amazonaws.com/rstudio-shiny-server-os-build/ubuntu-12.04/x86_64/VERSION -O "version.txt" &&
- VERSION=$(cat version.txt) &&
- wget --no-verbose "https://s3.amazonaws.com/rstudio-shiny-server-os-build/ubuntu-12.04/x86_64/shiny-server-$VERSION-amd64.deb" -O ss-latest.deb &&
- gdebi -n ss-latest.deb &&
- rm -f version.txt ss-latest.deb
- # I needed this for rJava-related errors
- RUN R CMD javareconf
- # Install R packages required by my app
- RUN R -e "install.packages(c('shiny', 'xlsx', 'tidyr', 'DT', 'RColorBrewer', 'ggdendro', 'dendsort', 'grid', 'gridExtra', 'igraph', 'circlize', 'gplots', 'shinyFiles', 'shinydashboard', 'shinyjs', 'devtools', 'fpc', 'cluster', 'readr', 'CytobankAPI', 'stringr', 'dplyr', 'tibble'), repos='http://cran.rstudio.com/')"
- # Install Bioconductor dependencies
- RUN Rscript -e 'source("http://bioconductor.org/biocLite.R")' -e 'biocLite("ComplexHeatmap")'
- # Remove Shiny example inherited from the base image
- RUN rm -rf /srv/shiny-server/*
- # copy the app to the image
- COPY shiny-server.conf /etc/shiny-server/shiny-server.conf
- RUN mkdir /srv/shiny-server/cytocluster/
- COPY ./* /srv/shiny-server/cytocluster/
- EXPOSE 3838
- COPY shiny-server.sh /usr/bin/shiny-server.sh
- RUN chmod +x /usr/bin/shiny-server.sh
- CMD ["/usr/bin/shiny-server.sh"]
- docker run --rm -p 3838:3838 [image]
Add Comment
Please, Sign In to add comment