-
Notifications
You must be signed in to change notification settings - Fork 58
/
Copy pathDockerfile.focal
144 lines (129 loc) · 4.52 KB
/
Dockerfile.focal
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
FROM ubuntu:focal
# update apt & install packages
RUN apt-get update -qq && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
build-essential \
curl \
git \
gnupg \
libboost-all-dev \
libcurl4-openssl-dev \
locales \
lsb-release \
moreutils \
openssh-client \
protobuf-compiler \
sudo && \
rm -rf /var/lib/apt/lists/*
# add R apt repository
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0x51716619e084dab9 && \
echo "deb http://cran.rstudio.com/bin/linux/ubuntu focal-cran40/" >> /etc/apt/sources.list.d/cran-rstudio.list
# 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 \
gdebi-core \
jags \
libaio1 \
libatlas3-base \
libcairo2 \
libcairo2-dev \
libfftw3-dev \
libgdal-dev \
libgraphviz-dev \
libgsl0-dev \
libmysqlclient-dev \
libnetcdf-dev \
libpcre2-dev \
libprocps-dev \
libproj-dev \
libprotoc-dev \
libquantlib0-dev \
libsasl2-dev \
libssh-dev \
libsqliteodbc \
libxml2-dev \
libxt-dev \
libxt6 \
odbc-postgresql \
tdsodbc \
unixodbc \
unixodbc-dev \
wget \
zip && \
rm -rf /var/lib/apt/lists/*
# Note: myodbc is not available for focal: https://launchpad.net/myodbc
RUN cd /tmp && \
wget -q https://dev.mysql.com/get/Downloads/Connector-ODBC/8.0/mysql-connector-odbc-8.0.23-linux-glibc2.12-x86-64bit.tar.gz && \
tar zxf mysql-connector-odbc-8.0.23-linux-glibc2.12-x86-64bit.tar.gz && \
cp -r mysql-connector-odbc-8.0.23-linux-glibc2.12-x86-64bit/bin/* /usr/local/bin && \
cp -r mysql-connector-odbc-8.0.23-linux-glibc2.12-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.23-linux-glibc2.12-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-11-jdk cargo && \
rm -rf /var/lib/apt/lists/*
RUN apt-get update -qq && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
python3-dev \
python3-pip \
python3-venv \
python3-virtualenv && \
rm -rf /var/lib/apt/lists/*
# Install Julia
RUN wget -q https://julialang-s3.julialang.org/bin/linux/x64/1.0/julia-1.0.5-linux-x86_64.tar.gz && \
tar -C /usr/local -zxf julia-1.0.5-linux-x86_64.tar.gz && \
ln -s /usr/local/julia-1.0.5/bin/julia /usr/local/bin/julia && \
rm julia-1.0.5-linux-x86_64.tar.gz
# 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/*
# Install 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 \
biber \
lmodern \
ps2eps \
texinfo \
texlive-bibtex-extra \
texlive-extra-utils \
texlive-font-utils \
texlive-lang-arabic \
texlive-latex-extra \
texlive-luatex \
texlive-pstricks \
texlive-xetex && \
rm -rf /var/lib/apt/lists/*
# Set /usr/bin/python to be python3
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 20
# 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-2004/R-${R_VERSION}-ubuntu-2004.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 && \
rm /tmp/R-${R_VERSION}.tar.gz
# set UTF-8
RUN echo "LANG=C.UTF-8" >> /usr/lib/R/etc/Renviron.site