Skip to content

Instantly share code, notes, and snippets.

@dbaston
Created July 21, 2016 12:57
Show Gist options
  • Save dbaston/dbe18fcfe7714caa92d096e57a12a484 to your computer and use it in GitHub Desktop.
Save dbaston/dbe18fcfe7714caa92d096e57a12a484 to your computer and use it in GitHub Desktop.
postgis build environment
FROM phusion/baseimage
RUN apt-get update && apt-get install -y build-essential git bison flex zlib1g-dev autoconf libtool libxml2-dev libproj-dev libjson0-dev libcunit1-dev libxml2-utils xsltproc imagemagick docbook-xsl docbook-mathml libgdal-dev wget cmake libgmp-dev libmpfi-dev libboost-thread-dev libboost-system-dev
RUN git clone --depth 1 https://github.com/postgres/postgres.git && cd postgres && ./configure --without-readline && make -j6 && make install && make clean && cd .. && rm -rf postgres
RUN git clone --depth 1 https://github.com/libgeos/libgeos.git && cd libgeos && ./autogen.sh && ./configure --libdir=/usr/lib && make -j6 && make install && make clean && cd .. && rm -rf libgeos
RUN wget https://github.com/CGAL/cgal/releases/download/releases%2FCGAL-4.7/CGAL-4.7.tar.gz && tar xzvf CGAL-4.7.tar.gz && rm CGAL-4.7.tar.gz && cd CGAL-4.7 && cmake . && make -j6 && make install && make clean && cd .. && rm -rf CGAL-4.7
RUN git clone --depth 1 https://github.com/Oslandia/SFCGAL.git && cd SFCGAL && cmake . && make -j6 && make install && make clean && cd .. && rm -rf SFGAL
RUN ldconfig /usr/local/lib
RUN useradd -ms /bin/bash postgres
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment