This repository has been archived by the owner on May 19, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
/
Dockerfile
112 lines (110 loc) · 2.77 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
FROM postgres:9.6
MAINTAINER "Lukas Martinelli <[email protected]>"
ENV POSTGIS_MAJOR=2.4dev \
POSTGIS_VERSION=2.4dev \
GEOS_VERSION=3.6.0
RUN apt-get -qq -y update \
&& apt-get -qq -y --no-install-recommends install \
autoconf \
automake \
autotools-dev \
build-essential \
ca-certificates \
bison \
cmake \
curl \
dblatex \
docbook-mathml \
docbook-xsl \
git \
gdal-bin \
libcunit1-dev \
libkakasi2-dev \
libtool \
pandoc \
unzip \
xsltproc \
# PostGIS build dependencies
libgdal-dev \
libjson0-dev \
libproj-dev \
libxml2-dev \
postgresql-server-dev-$PG_MAJOR \
## GEOS
&& cd /opt/ \
&& curl -o /opt/geos.tar.bz2 http://download.osgeo.org/geos/geos-$GEOS_VERSION.tar.bz2 \
&& mkdir /opt/geos \
&& tar xf /opt/geos.tar.bz2 -C /opt/geos --strip-components=1 \
&& cd /opt/geos/ \
&& ./configure \
&& make -j \
&& make install \
&& rm -rf /opt/geos* \
## Protobuf
&& cd /opt/ \
&& curl -L https://github.com/google/protobuf/archive/v3.0.2.tar.gz | tar xvz && cd protobuf-3.0.2 \
&& ./autogen.sh \
&& ./configure \
&& make \
&& make install \
&& ldconfig \
&& rm -rf /opt/protobuf-3.0.2 \
## Protobuf-c
&& cd /opt/ \
&& curl -L https://github.com/protobuf-c/protobuf-c/releases/download/v1.2.1/protobuf-c-1.2.1.tar.gz | tar xvz && cd protobuf-c-1.2.1 \
&& ./configure \
&& make \
&& make install \
&& ldconfig \
&& rm -rf /opt/protobuf-c.1.2.1 \
## Postgis
&& cd /opt/ \
&& git clone -b svn-trunk https://github.com/postgis/postgis.git \
&& cd postgis \
&& git reset --hard ff0a844e606622f45841fc25221bbaa136ed1001 \
&& ./autogen.sh \
&& ./configure CFLAGS="-O0 -Wall" \
&& make \
&& make install \
&& ldconfig \
&& rm -rf /opt/postgis \
## UTF8Proc
&& cd /opt/ \
&& git clone https://github.com/JuliaLang/utf8proc.git \
&& cd utf8proc \
&& git checkout -q v2.0.2 \
&& make \
&& make install \
&& ldconfig \
&& rm -rf /opt/utf8proc \
## Mapnik German
&& cd /opt/ \
&& git clone https://github.com/openmaptiles/mapnik-german-l10n.git \
&& cd mapnik-german-l10n \
&& make \
&& make install \
&& rm -rf /opt/mapnik-german-l10n \
## Cleanup
&& apt-get -qq -y --auto-remove purge \
autoconf \
automake \
autotools-dev \
build-essential \
ca-certificates \
bison \
cmake \
curl \
dblatex \
docbook-mathml \
docbook-xsl \
git \
libcunit1-dev \
libtool \
make \
g++ \
gcc \
pandoc \
unzip \
xsltproc \
&& rm -rf /var/lib/apt/lists/*
COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh