FROM alpine:3.9.4 LABEL maintainer="yevhen.panko@teamdev.com" ENV BASE_HREF=- JAVA_VERSION=8u212 JAVA_ALPINE_VERSION=8.212.04-r1 LANG=C.UTF-8 JAVA_HOME=/usr/lib/jvm/java-1.8-openjdk/jre PATH=$PATH:/usr/lib/jvm/java-1.8-openjdk/jre/bin:/usr/lib/jvm/java-1.8-openjdk/bin R_BASE_VERSION=3.5.1-r1 R_LIBS_USER=/usr/local/lib/R/site-library/ # Set up R # Needed by script-worker. This is done in the base image since this takes a while and base images aren't rebuilt as often as all-services. ADD docker_off_server/assets/configuration/Rprofile /root/.Rprofile RUN apk add --no-cache R="$R_BASE_VERSION" R-dev="$R_BASE_VERSION" g++ linux-headers && rm -rf /var/cache/apk/* RUN R -e "install.packages('Rserve',,'http://www.rforge.net/')" && R -e "install.packages('littler')" RUN echo 'options(repos = c(CRAN = "https://cloud.r-project.org/"), download.file.method = "libcurl")' >> /etc/R/Rprofile.site \ && echo 'source("/etc/R/Rprofile.site")' >> /etc/littler.r \ && mkdir -p /usr/local/lib/R/site-library \ && ln -s /usr/lib/R/library/littler/bin/r /usr/local/bin/r \ && ln -s /usr/lib/R/library/littler/examples/install.r /usr/local/bin/install.r \ && ln -s /usr/lib/R/library/littler/examples/install2.r /usr/local/bin/install2.r \ && ln -s /usr/lib/R/library/littler/examples/installGithub.r /usr/local/bin/installGithub.r \ && ln -s /usr/lib/R/library/littler/examples/testInstalled.r /usr/local/bin/testInstalled.r \ # All of the dependencies before heatmapl are part of the r-recommended package on Debian that's installed in the original Dockerfile. && install.r codetools KernSmooth Matrix MASS boot cluster foreign lattice mgcv nlme rpart survival heatmaply irlba lmerTest docopt beeswarm car caret circlize clinfun coxme dplyr echarts4r edgebundleR emmeans EnvStats factoextra FactoMineR flux GGally gganimate ggcorrplot ggdendro ggforce ggplot2 ggpubr ggraph ggrepel ggridges ggthemes glmnet highcharter igraph lme4 logNormReg lubridate migest multcomp NMF patchwork pheatmap plotly plotROC pROC psych quantreg randomForest RColorBrewer reshape2 Rtsne scales stringr survminer tidyr tsne umap \ # BiocManager has to be installed this way, or R -e won't pick it up. 'fgsea' can only be installed using BiocManager. && R -e "install.packages('BiocManager')" && R -e "BiocManager::install('fgsea')" \ # The ComplexHeatmap, GSVA, limma, NormqPCR, org.Hs.eg.db also require the BiocManager && R -e "BiocManager::install('ComplexHeatmap')" && R -e "BiocManager::install('GSVA')" && R -e "BiocManager::install('limma')" && R -e "BiocManager::install('NormqPCR')" && R -e "BiocManager::install('org.Hs.eg.db')" \ && rm -rf /tmp/downloaded_packages && rm -rf /tmp/make_packages EXPOSE 6311 ENTRYPOINT [ "R", "CMD", "Rserve", "--save", "--RS-set", "daemon=disable", "2>>/var/log/r.err", ">>/var/log/r.out"]