-
Notifications
You must be signed in to change notification settings - Fork 57
/
Copy pathDockerfile.xenial
153 lines (136 loc) · 5.07 KB
/
Dockerfile.xenial
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
FROM ubuntu:xenial
MAINTAINER RStudio Docker <[email protected]>
# add R apt repository
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0x51716619e084dab9 && \
echo "deb http://cran.rstudio.com/bin/linux/ubuntu xenial-cran35/" >> /etc/apt/sources.list.d/cran-rstudio.list
# update apt & install packages
RUN apt-get update -qq && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
build-essential \
curl \
git \
libboost-all-dev \
libcurl4-openssl-dev \
locales \
lsb-release \
moreutils \
openssh-client \
protobuf-compiler \
sudo && \
rm -rf /var/lib/apt/lists/*
# Ensure FreeTDS is added to unixodbc upon installation
RUN echo tdsodbc freetds/addtoodbc boolean true | debconf-set-selections
# Install libraries & database related packages separately to break up the layers
RUN apt-get update -qq && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
jags \
libatlas3-base \
libcairo2 \
libcairo2-dev \
libfftw3-dev \
libgdal1-dev \
libgraphviz-dev \
libgsl0-dev \
libmysqlclient-dev \
libnetcdf-dev \
libpcre2-dev \
libprocps4-dev \
libproj-dev \
libprotoc-dev \
libquantlib0-dev \
libsasl2-dev \
libsqliteodbc \
libxml2-dev \
libxt-dev \
libxt6 \
odbc-postgresql \
tdsodbc \
unixodbc \
unixodbc-dev \
wget && \
rm -rf /var/lib/apt/lists/*
# Note: myodbc is not available for Xenial: https://launchpad.net/myodbc
RUN cd /tmp && \
wget -q https://dev.mysql.com/get/Downloads/Connector-ODBC/8.0/mysql-connector-odbc-8.0.17-linux-ubuntu16.04-x86-64bit.tar.gz && \
tar zxf mysql-connector-odbc-8.0.17-linux-ubuntu16.04-x86-64bit.tar.gz && \
cp mysql-connector-odbc-8.0.17-linux-ubuntu16.04-x86-64bit/bin/* /usr/local/bin && \
cp mysql-connector-odbc-8.0.17-linux-ubuntu16.04-x86-64bit/lib/* /usr/local/lib && \
myodbc-installer -a -d -n "MySQL" -t "Driver=/usr/local/lib/libmyodbc8w.so" && \
myodbc-installer -a -d -n "MySQL ODBC 8.0 Driver" -t "Driver=/usr/local/lib/libmyodbc8w.so" && \
rm -rf mysql-connector-odbc-8.0.17-linux-ubuntu16.04-x86-64bit*
# Install JDK and Cargo separately to avoid the recommended packages
RUN apt-get update -qq && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends openjdk-8-jdk cargo && \
rm -rf /var/lib/apt/lists/*
RUN apt-get update -qq && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
python-dev \
python-pip \
python-virtualenv
# Install Julia
RUN wget -q https://julialang-s3.julialang.org/bin/linux/x64/1.0/julia-1.0.2-linux-x86_64.tar.gz && \
tar -C /usr/local -zxf julia-1.0.2-linux-x86_64.tar.gz && \
ln -s /usr/local/julia-1.0.2/bin/julia /usr/local/bin/julia && \
rm julia-1.0.2-linux-x86_64.tar.gz
# Install texlive separately, in three parts, because it is so large.
# First install some non-texlive packages which are recommended but will be skipped when we install texlive
# in order to not install the documentation.
#
# biber depends on libwww-perl which has a tree of recommended packages
# texlive-base depends on xdg-utils which has a tree of recommended packages
# texinfo depends upon libxml-libxml-perl which has a tree of recommended packages
RUN apt-get update -qq && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
libfile-homedir-perl \
libwww-perl \
libxml-libxml-perl \
libyaml-tiny-perl \
ruby \
tcl \
tex-gyre \
tk \
xdg-utils \
xzdec && \
rm -rf /var/lib/apt/lists/*
# First part of texlive itself. Use --no-install-recommends to avoid installing ~750MB of documentation
RUN apt-get update -qq && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
texlive \
texlive-fonts-extra \
texlive-generic-recommended && \
rm -rf /var/lib/apt/lists/*
# Second part of texlive itself. Use --no-install-recommends to avoid installing ~750MB of documentation
RUN apt-get update -qq && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
biber \
latex-beamer \
lmodern \
prosper \
ps2eps \
texinfo \
texlive-bibtex-extra \
texlive-extra-utils \
texlive-font-utils \
texlive-generic-extra \
texlive-lang-arabic \
texlive-latex-extra \
texlive-luatex \
texlive-pstricks \
texlive-xetex && \
rm -rf /var/lib/apt/lists/*
RUN wget https://github.com/jgm/pandoc/releases/download/2.3.1/pandoc-2.3.1-1-amd64.deb && \
dpkg -i pandoc-2.3.1-1-amd64.deb && \
rm pandoc-2.3.1-1-amd64.deb
# Set default locale
RUN update-locale --reset LANG=C.UTF-8
ARG R_VERSION=4.2.2
# Install R
RUN wget -q https://cdn.rstudio.com/r/ubuntu-1604/R-${R_VERSION}-ubuntu-1604.tar.gz -O /tmp/R-${R_VERSION}.tar.gz && \
mkdir -p /opt/R && \
tar zx -C /opt/R -f /tmp/R-${R_VERSION}.tar.gz && \
ln -s /opt/R/${R_VERSION}/bin/R /usr/bin/R && \
ln -s /opt/R/${R_VERSION}/bin/Rscript /usr/bin/Rscript && \
ln -s /opt/R/${R_VERSION}/lib/R /usr/lib/R && \
rm /tmp/R-${R_VERSION}.tar.gz
# set UTF-8
RUN echo "LANG=C.UTF-8" >> /usr/lib/R/etc/Renviron.site