La migration est terminée. Bien qu'elle a été beaucoup plus longue que prévue, elle s'est bien déroulée. N'hésitez pas à signaler tout problème à forge.support@irstea.fr.

Commit 6f52d6f3 authored by Guillaume Perréal's avatar Guillaume Perréal

Updated the Dockerfile to reduce size.

parent 2481a4c0
FROM rocker/shiny ARG R_TAG=3.5.2
FROM rocker/shiny:$R_TAG AS builder
# Install and build R packages from CRAN and BioConduit, removing documentation and tests
RUN R -e 'install.packages( \ RUN R -e 'install.packages( \
c("BiocManager", "DT", "dplyr", "factoextra", "glue", "microbenchmark", "shinycustomloader", "shinydashboard"), \ c("BiocManager", "DT", "dplyr", "factoextra", "glue", "microbenchmark", "shinycustomloader", "shinydashboard"), \
Ncpus='$(nproc)', \ Ncpus='$(nproc)', \
clean=1, \ clean=1, \
verbose=1 \
)' \ )' \
&& rm /usr/local/lib/R/*/*/{doc,html,help,unitTests} && R -e 'BiocManager::install("phyloseq", Ncpus='$(nproc)', clean=1)' \
&& rm -rf /usr/local/lib/R/*/*/{doc,html,help,unitTests}
RUN R -e 'BiocManager::install("phyloseq", Ncpus='$(nproc)', clean=1)' \
&& rm /usr/local/lib/R/*/*/{doc,html,help,unitTests}
# Use Yelp/dumb-init as entrypoint to properly handle Unix signals
ARG DUMB_INIT_VERSION=1.2.2 ARG DUMB_INIT_VERSION=1.2.2
RUN wget -O /sbin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v${DUMB_INIT_VERSION}/dumb-init_${DUMB_INIT_VERSION}_amd64 \ ADD https://github.com/Yelp/dumb-init/releases/download/v${DUMB_INIT_VERSION}/dumb-init_${DUMB_INIT_VERSION}_amd64 /sbin/dumb-init
&& chmod +x /sbin/dumb-init RUN chmod +x /sbin/dumb-init
ENTRYPOINT ["/sbin/dumb-init", "--"] ENTRYPOINT ["/sbin/dumb-init", "--"]
# Start the shiny server by default
CMD ["/usr/bin/shiny-server.sh"] CMD ["/usr/bin/shiny-server.sh"]
# Clear /srv/shiny-server/ and create /var/lib/shiny-server
RUN rm -rf /srv/shiny-server/* \ RUN rm -rf /srv/shiny-server/* \
&& mkdir -p /srv/shiny-server/easy16s /var/lib/shiny-server && mkdir -p var/lib/shiny-server
# Install easy16S sources and resource
ADD *.R /srv/shiny-server/
ADD www /srv/shiny-server/www
ADD *.R /srv/shiny-server/easy16s/ # Build demo data
ADD demo/demo.RData demo/chaillou.* /srv/shiny-server/easy16s/demo/ ADD demo /tmp/demo
ADD www /srv/shiny-server/easy16s/www RUN cd /tmp/demo \
&& R -f make-demo.R \
&& mkdir -p /srv/shiny-server/demo \
&& ls -la && cp demo.RData /srv/shiny-server/demo
# Fix file permissions
RUN chmod -R a+rX /srv/shiny-server/ \ RUN chmod -R a+rX /srv/shiny-server/ \
&& chgrp shiny /var/lib/shiny-server \ && chgrp shiny /var/lib/shiny-server \
&& chmod g+rwxs /var/lib/shiny-server && chmod g+rwxs /var/lib/shiny-server
# Run with a non-privileged user
USER shiny USER shiny
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment