forked from FredHutch/Oncoscape
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
51 lines (39 loc) · 1.35 KB
/
Copy pathDockerfile
File metadata and controls
51 lines (39 loc) · 1.35 KB
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
# Use Ubuntu 14.04 as the base container
FROM ubuntu:14.04
# ADD the CRAN Repo to the apt sources list
RUN echo "deb http://cran.fhcrc.org/bin/linux/ubuntu trusty/" > /etc/apt/sources.list.d/cran.fhcrc.org.list
# Add the package verification key
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 51716619E084DAB9
# Update the system and install packages
RUN apt-get -y -qq update && apt-get -y -qq install \
r-base=3.2.2* \
r-recommended=3.2.2-1trusty0* \
make \
gcc \
g++ \
libxml2 \
libxml2-dev \
python-pip
# Install latest version of Node 5.x
RUN curl -sL https://deb.nodesource.com/setup_5.x | bash -
RUN apt-get -y install nodejs
# Create the sttrweb user and data directory
RUN useradd -u 7534 -m -d /home/sttrweb -c "sttr web application" sttrweb && \
mkdir /home/sttrweb/data && \
mkdir /home/sttrweb/Oncoscape && \
mkdir /home/sttrweb/rlib
# Install R Modules
ADD r_modules /home/sttrweb/Oncoscape/r_modules
WORKDIR /home/sttrweb/Oncoscape/r_modules
RUN make install
# Install Node Server + Modules
ADD server /home/sttrweb/Oncoscape/server
WORKDIR /home/sttrweb/Oncoscape/server
RUN npm install
# Install Rstats
WORKDIR /home/sttrweb/Oncoscape/server/rstats
RUN npm install -g node-gyp && node-gyp configure build
EXPOSE 80
# Switch to the server directory and start it up
WORKDIR /home/sttrweb/Oncoscape/server
CMD ["node", "start.js"]