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/ RUN apk add --no-cache gcc bash cyrus-sasl curl supervisor libc-dev coreutils make openssl openssl-dev nginx \ ca-certificates java-cacerts wget ttf-dejavu bzip2 xz openjdk8 && rm -rf /var/cache/apk/* # Set up R (3.5.1-r1) # 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 COPY build/libs/*.jar /usr/src/dspda-script-worker/dspda-script-worker.jar ADD docker_off_server/assets/configuration/supervisord.conf /etc/supervisor/conf.d/supervisord.conf COPY docker_off_server/assets/runscripts/r_serv.sh docker_off_server/assets/runscripts/script-worker.sh \ /usr/src/dspda-script-worker/scripts/ RUN apk add --no-cache R R-dev 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 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 \ # 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')" \ && rm -rf /tmp/downloaded_packages && rm -rf /tmp/make_packages EXPOSE 8380 ENTRYPOINT [ "supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf" ]