FROM alpine:3.9.4 LABEL maintainer="ingmars.melkis@swdfactory.com" # Increment to force a rebuild of the entire image ENV VERSION 1 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 dependencies RUN apk add --no-cache gcc bash cyrus-sasl curl supervisor libc-dev coreutils make openssl openssl-dev nginx ca-certificates java-cacerts wget bzip2 xz openjdk8 # Set up R # Needed by script-worker and pathway service. ADD assets/Rprofile /root/.Rprofile RUN apk add --no-cache R="$R_BASE_VERSION" R-dev="$R_BASE_VERSION" g++ linux-headers 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 heatmaply 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 # Set up apps ADD assets/nginx-vhost /etc/nginx/conf.d/default.conf ADD assets/nginx.conf /etc/nginx/nginx.conf ADD assets/runscripts/supervisord.conf /etc/supervisor/conf.d/supervisord.conf COPY assets/runscripts/pluto.sh assets/runscripts/nginx.sh assets/runscripts/r_serv.sh assets/runscripts/worker.sh assets/runscripts/visualization.sh assets/runscripts/pathways.sh assets/runscripts/import_certs.sh /usr/local/pluto/scripts/ ADD target/front.tar.gz /usr/local/pluto/front ADD target/Pluto-0.0.1-SNAPSHOT.jar /usr/local/pluto/pluto.jar RUN mkdir -p /usr/local/dspda-script-worker && mkdir -p /usr/local/dspda-visualization-service && mkdir -p /usr/local/dspda-pathway-service ADD target/worker.jar /usr/local/dspda-script-worker/dspda-script-worker.jar ADD target/visualization-service.jar /usr/local/dspda-visualization-service/app.jar ADD target/pathways.jar /usr/local/dspda-pathway-service/dspda-pathway-service.jar ADD assets/configuration/visualization-service.properties /usr/local/dspda-visualization-service/application.properties EXPOSE 80 HEALTHCHECK --interval=30s --timeout=5s \ CMD curl -f http://127.0.0.1/dspda-heartbeat || exit 1 ENTRYPOINT [ "supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf" ]