Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Guillaume Perréal
easy16S
Commits
6f52d6f3
Commit
6f52d6f3
authored
Jan 15, 2019
by
Guillaume Perréal
Browse files
Updated the Dockerfile to reduce size.
parent
2481a4c0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Dockerfile
View file @
6f52d6f3
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(
\
c("BiocManager", "DT", "dplyr", "factoextra", "glue", "microbenchmark", "shinycustomloader", "shinydashboard"),
\
Ncpus='
$(
nproc
)
',
\
clean=1,
\
verbose=1
\
)'
\
&&
rm
/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
}
&&
R
-e
'BiocManager::install("phyloseq", Ncpus='
$(
nproc
)
', clean=1)'
\
&&
rm
-rf
/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
RUN
wget
-O
/sbin/dumb-init
https://github.com/Yelp/dumb-init/releases/download/v
${
DUMB_INIT_VERSION
}
/dumb-init_
${
DUMB_INIT_VERSION
}
_amd64
\
&&
chmod
+x /sbin/dumb-init
ADD
https://github.com/Yelp/dumb-init/releases/download/v${DUMB_INIT_VERSION}/dumb-init_${DUMB_INIT_VERSION}_amd64
/sbin/dumb-init
RUN
chmod
+x /sbin/dumb-init
ENTRYPOINT
["/sbin/dumb-init", "--"]
# Start the shiny server by default
CMD
["/usr/bin/shiny-server.sh"]
# Clear /srv/shiny-server/ and create /var/lib/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/
ADD
demo/demo.RData demo/chaillou.* /srv/shiny-server/easy16s/demo/
ADD
www /srv/shiny-server/easy16s/www
# Build demo data
ADD
demo /tmp/demo
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/
\
&&
chgrp
shiny /var/lib/shiny-server
\
&&
chmod
g+rwxs /var/lib/shiny-server
# Run with a non-privileged user
USER
shiny
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment