-
Notifications
You must be signed in to change notification settings - Fork 142
/
Dockerfile
94 lines (76 loc) · 2.57 KB
/
Dockerfile
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
FROM rocker/drd
## This handle reaches Me
MAINTAINER "Prateek Baranwal"
ENV DEBIAN-FRONTEND noninteractive
ENV ROOT /data/rcloud
RUN apt-get update \
&& apt-get install -y -t unstable --no-install-recommends \
libcairo2 \
libpng-dev \
libboost-dev \
libxt-dev \
libcairo2-dev \
libxml2-dev \
libcurl4-openssl-dev \
ca-certificates \
file \
git \
libssl1.0.2 \
libapparmor1 \
libedit2 \
libssl-dev \
sudo \
curl \
python-dev \
python-zmq \
ipython \
python-matplotlib
## A default user system configuration. For historical reasons,
## we want user to be 'rcloud', but it is 'docker' in r-base
RUN usermod -l rcloud docker \
&& usermod -m -d /home/rcloud rcloud \
&& groupmod -n rcloud docker \
&& echo '"\e[5~": history-search-backward' >> /etc/inputrc \
&& echo '"\e[6~": history-search-backward' >> /etc/inputrc \
&& echo "rcloud:rcloud" | chpasswd
## Create RCloud project folder
RUN mkdir -p /data/rcloud
RUN mkdir -p /data/rcloud/data/gists
RUN chmod -R a+rwx /data/rcloud/data
## Get Pandoc
RUN cd /tmp \
&& wget https://s3.amazonaws.com/rstudio-buildtools/pandoc-1.13.1.zip \
&& unzip ./pandoc-1.13.1.zip \
&& cp pandoc-1.13.1/linux/debian/x86_64/* /usr/local/bin/ \
&& rm -rf pandoc-1.13.1
ADD conf /data/rcloud/conf
ADD htdocs /data/rcloud/htdocs
ADD packages /data/rcloud/packages
ADD rcloud.client /data/rcloud/rcloud.client
ADD rcloud.packages /data/rcloud/rcloud.packages
ADD rcloud.support /data/rcloud/rcloud.support
ADD scripts /data/rcloud/scripts
ADD tests /data/rcloud/tests
ADD VERSION /data/rcloud/VERSION
ADD package.json /data/rcloud/package.json
ADD Gruntfile.js /data/rcloud/Grunfile.js
ADD docker /data/rcloud/docker
RUN cd /data/rcloud && git apply docker/domainCookie.patch
RUN cd /data/rcloud \
&& scripts/bootstrapR.sh \
&& scripts/build.sh --all
## Get rcloud extention modules
RUN cd /data/rcloud/rcloud.packages \
&& git clone https://github.com/att/rcloud.shiny.git \
&& git clone https://github.com/att/rcloud.params.git \
&& git clone https://github.com/att/rcloud.logo.git \
&& git clone https://github.com/att/rcloud.dcplot.git \
&& R -e "install.packages(c('rcloud.shiny','rpython2'),repos=c('http://rforge.net','http://r.research.att.com'))"
COPY docker/rcloud.conf /data/rcloud/conf
COPY docker/init.sh /bin
COPY docker/index.html /data/rcloud/htdocs
COPY docker/dockerbye.R /data/rcloud/htdocs
RUN chown -R rcloud:rcloud /data/rcloud
EXPOSE 8080
WORKDIR /data/rcloud
ENTRYPOINT /bin/init.sh