Guest User

Untitled

a guest
Feb 22nd, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.64 KB | None | 0 0
  1. # Start from an image containing R
  2. FROM r-base:latest
  3.  
  4. # Install dependencies
  5. RUN apt-get update && apt-get install -y
  6. sudo
  7. gdebi-core
  8. pandoc
  9. pandoc-citeproc
  10. libcurl4-gnutls-dev
  11. libcairo2-dev/unstable
  12. libxt-dev
  13. libssl-dev
  14. gsl-bin
  15. libgsl0-dev
  16. default-jdk
  17.  
  18.  
  19. RUN wget --no-verbose https://s3.amazonaws.com/rstudio-shiny-server-os-build/ubuntu-12.04/x86_64/VERSION -O "version.txt" &&
  20. VERSION=$(cat version.txt) &&
  21. 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 &&
  22. gdebi -n ss-latest.deb &&
  23. rm -f version.txt ss-latest.deb
  24.  
  25.  
  26. # I needed this for rJava-related errors
  27. RUN R CMD javareconf
  28.  
  29. # Install R packages required by my app
  30. 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/')"
  31.  
  32. # Install Bioconductor dependencies
  33. RUN Rscript -e 'source("http://bioconductor.org/biocLite.R")' -e 'biocLite("ComplexHeatmap")'
  34.  
  35. # Remove Shiny example inherited from the base image
  36. RUN rm -rf /srv/shiny-server/*
  37.  
  38. # copy the app to the image
  39. COPY shiny-server.conf /etc/shiny-server/shiny-server.conf
  40. RUN mkdir /srv/shiny-server/cytocluster/
  41. COPY ./* /srv/shiny-server/cytocluster/
  42. EXPOSE 3838
  43. COPY shiny-server.sh /usr/bin/shiny-server.sh
  44. RUN chmod +x /usr/bin/shiny-server.sh
  45.  
  46. CMD ["/usr/bin/shiny-server.sh"]
  47.  
  48. docker run --rm -p 3838:3838 [image]
Add Comment
Please, Sign In to add comment