-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
47 lines (39 loc) · 1.38 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
FROM python:3
ENV GDAL_VERSION=2.3.1
# Update base container install
RUN apt-get update
RUN apt-get upgrade -y
# Add unstable repo to allow us to access latest GDAL builds
RUN echo deb http://ftp.uk.debian.org/debian unstable main contrib non-free >> /etc/apt/sources.list
RUN apt-get update
# Existing binutils causes a dependency conflict, correct version will be installed when GDAL gets intalled
RUN apt-get remove -y binutils
# Install GDAL dependencies
RUN apt-get -t unstable install -y libgdal-dev g++
# Update C env vars so compiler can find gdal
ENV CPLUS_INCLUDE_PATH=/usr/include/gdal
ENV C_INCLUDE_PATH=/usr/include/gdal
# This will install latest version of GDAL
RUN pip install GDAL==${GDAL_VERSION}
## Install GDAL
#RUN wget http://download.osgeo.org/gdal/$GDAL_VERSION/gdal-${GDAL_VERSION}.tar.gz -O /tmp/gdal-${GDAL_VERSION}.tar.gz -nv \
# && tar -x -f /tmp/gdal-${GDAL_VERSION}.tar.gz -C /tmp \
# && cd /tmp/gdal-${GDAL_VERSION} \
# && ./configure \
# --prefix=/usr \
# --with-python \
# --with-geos \
# --with-sfcgal \
# --with-geotiff \
# --with-jpeg \
# --with-png \
# --with-expat \
# --with-libkml \
# --with-openjpeg \
# --with-pg \
# --with-curl \
# --with-spatialite \
# && make -j
## && make -j $(nproc)
## && make install \
## && rm /tmp/gdal-${GDAL_VERSION} -rf