-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile-base
65 lines (58 loc) · 1.94 KB
/
Dockerfile-base
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
## This creates a Docker image that will make the multiGSEA.shiny::explore()
## application available on http://localhost/multiGSEA
##
## tips: http://tamaszilagyi.com/blog/dockerized-shiny-app-development/
## Start with the base shiny image
FROM rocker/shiny
LABEL maintainer="Steve Lianoglou ([email protected])"
## install some system dependencies we want our server to have
RUN apt-get update && apt-get install -y \
gnupg2 \
libssl-dev \
libssh2-1-dev \
libxml2 \
libxml2-dev \
libv8-3.14-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/ \
&& rm -rf /tmp/downloaded_packages/ /tmp/*.rds
## multiGSEA and friends dependencies are fully specified in their
## `Depends:` and `Imports:`, so this should suffice:
RUN Rscript -e "source('https://bioconductor.org/biocLite.R'); \
biocLite(c(\
'remotes', \
'statmod', \
'webdriver', \
'devtools', \
'lianos/multiGSEA', \
'lianos/multiGSEA.shiny', \
'lianos/GeneSetDb.MSigDB.Hsapiens.v61', \
'lianos/GeneSetDb.MSigDB.Mmusculus.v61'))" \
&& rm -rf /tmp/downloaded_packages/ /tmp/*.rds
## install phantomjs
RUN Rscript -e "webdriver::install_phantomjs()"
## Copy the shiny application files to a multiGSEA subdirectory of the
## directory that shiny is serving apps from (/srv/shiny-server)
RUN cp -Rf \
`Rscript -e "cat(system.file('shiny', package = 'multiGSEA.shiny'))"` \
/srv/shiny-server/multiGSEA
RUN chmod -Rf 755 /srv/shiny-server/multiGSEA
# You then build this, like so:
#
# $ docker build -f Dockerfile-base -t lianos/multigsea:latest .
#
# Then run it like so:
#
# $ docker run -d -p 80:3838 --name multigsea lianos/multigsea:latest
#
# You can log into bash prompt of the running container like so:
#
# $ docker exec -i -t multigsea /bin/bash
#
# And you can acces the multiGSEA shiny app like so:
#
# http://localhost/multiGSEA
#
# once container is done you can remove it:
#
# $ docker rm multigsea