Newer
Older
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
FROM debian:jessie
ARG R_VERSION
ENV R_VERSION ${R_VERSION:-3-3-2}
ENV LC_ALL en_US.UTF-8
ENV LANG en_US.UTF-8
## dependencies
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
## keep for installing packages with compiled code, compression libs, linear algebra libs, graphics libs
g++ \
gfortran \
make \
libgfortran3 \
libglib2.0-0 \
libc6 \
libreadline6 \
ucf \
## linear algebra
libblas3 \
liblapack3 \
libquadmath0 \
## Perl Regex
libpcre3 \
libpaper-utils \
## Compression
libbz2-1.0 \
liblzma5 \
unzip \
zlib1g \
zip \
## Graphics
libcairo2 \
libjpeg62-turbo \
libpango-1.0-0 \
libpangocairo-1.0-0 \
libpng12-0 \
libtiff5 \
## networking
libcurl4-openssl-dev \
## for UTF-8 locale
locales \
## Preferred graphics fonts
fonts-texgyre \
wget \
&& rm -rf /var/lib/apt/lists/* \
&& echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen \
&& locale-gen en_US.utf8 \
&& /usr/sbin/update-locale LANG=en_US.UTF-8 \
&& BUILDDEPS="bash-completion \
bison \
debhelper \
ca-certificates \
default-jdk \
file \
groff-base \
libpcre3-dev \
libblas-dev \
libbz2-dev \
libcairo2-dev \
liblapack-dev \
liblzma-dev \
libjpeg-dev \
libpng-dev \
libreadline-dev \
libtiff5-dev \
libncurses5-dev \
libpango1.0-dev \
libx11-dev \
libxt-dev \
mpack \
subversion \
tcl8.6-dev \
texinfo \
texlive-extra-utils \
texlive-fonts-extra \
texlive-fonts-recommended \
texlive-latex-recommended \
tk8.6-dev \
x11proto-core-dev \
xauth \
xdg-utils \
xfonts-base \
xvfb \
zlib1g-dev" \
&& apt-get update -qq \
&& apt-get install -y --no-install-recommends $BUILDDEPS \
&& cd /tmp \
&& svn co https://svn.r-project.org/R/tags/R-${R_VERSION}/ R-devel \
&& cd /tmp/R-devel \
&& R_PAPERSIZE=letter \
R_BATCHSAVE="--no-save --no-restore" \
R_BROWSER=xdg-open \
PAGER=/usr/bin/pager \
PERL=/usr/bin/perl \
R_UNZIPCMD=/usr/bin/unzip \
R_ZIPCMD=/usr/bin/zip \
R_PRINTCMD=/usr/bin/lpr \
LIBnn=lib \
AWK=/usr/bin/awk \
CFLAGS=$(R CMD config CFLAGS) \
CXXFLAGS=$(R CMD config CXXFLAGS) \
./configure --enable-R-shlib \
--without-blas \
--without-lapack \
--with-readline \
--disable-nls \
--without-x \
--without-recommended-packages \
&& make \
&& make install \
&& echo 'options(repos = c(CRAN = "https://cran.rstudio.com/"), download.file.method = "libcurl")' >> /usr/local/lib/R/etc/Rprofile.site \
&& rm -rf /tmp/R-devel \
&& apt-get remove --purge -y $BUILDDEPS \
&& apt-get autoremove -y \
&& apt-get autoclean -y \
&& rm -rf /var/lib/apt/lists/*
CMD ["R"]