This repository has been archived by the owner on Feb 21, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 38
/
Dockerfile
98 lines (95 loc) · 2.37 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
95
96
97
98
FROM rocker/tidyverse:latest
MAINTAINER "Carl Boettiger" [email protected]
ENV GDAL_VERSION 2.1.3
ENV GEOS_VERSION 3.5.1
ENV LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
RUN apt-get update \
## && apt-get build-dep -y -o APT::Get::Build-Dep-Automatic=true libgdal-dev \
&& apt-get install -y --no-install-recommends \
lbzip2 \
## dev packages
libdap-dev \
libexpat1-dev \
libfftw3-dev \
libfreexl-dev \
# libgeos-dev \ # Need 3.5, this is 3.3
libgsl0-dev \
libglu1-mesa-dev \
libhdf4-alt-dev \
libhdf5-dev \
liblwgeom-dev \
libkml-dev \
libnetcdf-dev \
libproj-dev \
libsqlite3-dev \
libssl-dev \
libtcl8.5 \
libtk8.5 \
libtiff5-dev \
libudunits2-dev \
libxerces-c-dev \
## runtime packages
netcdf-bin \
unixodbc-dev \
&& wget http://download.osgeo.org/gdal/${GDAL_VERSION}/gdal-${GDAL_VERSION}.tar.gz \
&& tar -xf gdal-${GDAL_VERSION}.tar.gz \
&& wget http://download.osgeo.org/geos/geos-${GEOS_VERSION}.tar.bz2 \
&& tar -xf geos-${GEOS_VERSION}.tar.bz2 \
## Install dependencies of gdal-$GDAL_VERSION
## && echo "deb-src http://deb.debian.org/debian jessie main" >> /etc/apt/sources.list \
## Install libgeos \
&& cd /geos* \
&& ./configure \
&& make \
&& make install \
## Configure options loosely based on homebrew gdal2 https://github.com/OSGeo/homebrew-osgeo4mac/blob/master/Formula/gdal2.rb
&& cd /gdal* \
&& ./configure \
--with-curl \
--with-dods-root=/usr \
--with-freexl \
--with-geos \
--with-geotiff \
--with-hdf4 \
--with-hdf5=/usr/lib/x86_64-linux-gnu/hdf5/serial \
--with-libjson-c \
--with-netcdf \
--with-odbc \
##
--without-grass \
--without-libgrass \
&& make \
&& make install \
&& cd .. \
## Cleanup gdal & geos installation
&& rm -rf gdal-* geos-* \
&& . /etc/environment \
## Install R packages labeled "core" in Spatial taskview
&& install2.r --error \
--repos 'https://cloud.r-project.org/' \
--repos 'http://www.bioconductor.org/packages/release/bioc' \
## from CRAN
DCluster \
RColorBrewer \
RandomFields \
classInt \
deldir \
dggridR \
gstat \
lidR \
maptools \
ncdf4 \
proj4 \
raster \
rgdal \
rgeos \
rlas \
sf \
sp \
spacetime \
spatstat \
spdep \
splancs \
geoR \
## from bioconductor
rhdf5