Skip to content

Instantly share code, notes, and snippets.

@nkentNTIA
Created August 14, 2017 17:37
Show Gist options
  • Save nkentNTIA/969755e52c3f9dc0956890ffae9bbb68 to your computer and use it in GitHub Desktop.
Save nkentNTIA/969755e52c3f9dc0956890ffae9bbb68 to your computer and use it in GitHub Desktop.
Getting GDAL running w/ Python in a Docker container
FROM python:3.5
# Yes, all of the below is really to get GDAL running in a container. Your eyes do not deceive you.
RUN apt-get update -y
RUN apt-get install -y g++ \
wget \
libcurl4-openssl-dev \
build-essential \
libpq-dev \
ogdi-bin \
libogdi3.2-dev \
libjasper-runtime \
libjasper-dev \
libjasper1 \
libproj-dev \
libpoppler-dev \
libsqlite3-dev \
libspatialite-dev
RUN wget http://download.osgeo.org/gdal/2.1.3/gdal-2.1.3.tar.gz -P /tmp/
RUN tar -x -f /tmp/gdal-2.1.3.tar.gz -C /tmp
WORKDIR /tmp/gdal-2.1.3
RUN pwd && ls
RUN ./configure \
--prefix=/usr \
--with-python \
--with-geos \
--with-geotiff \
--with-jpeg \
--with-png \
--with-expat \
--with-libkml \
--with-openjpeg \
--with-pg \
--with-curl \
--with-spatialite
RUN make && make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment