-
Notifications
You must be signed in to change notification settings - Fork 137
/
Copy pathDockerfile
98 lines (91 loc) · 2.74 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
# There is an issue updating to postgis 12:
# the postgis base image has outdated ogr2ogr (gdal-bin package)
# does not support PG12 yet, which means postgis-preloaded cannot be built easily.
# Once it is updated, or there is a different way to build it, we can upgrade to 12.
ARG BASE_POSTGIS_VER=11-3.0
FROM postgis/postgis:$BASE_POSTGIS_VER
LABEL maintainer="Yuri Astrakhan <[email protected]>"
# https://github.com/pramsey/pgsql-gzip/releases
ARG PGSQL_GZIP_TAG=v1.0.0
ARG PGSQL_GZIP_REPO=https://github.com/pramsey/pgsql-gzip.git
# https://github.com/JuliaLang/utf8proc/releases
ARG UTF8PROC_TAG=v2.5.0
ARG UTF8PROC_REPO=https://github.com/JuliaLang/utf8proc.git
# osml10n - https://github.com/giggls/mapnik-german-l10n/releases
ARG MAPNIK_GERMAN_L10N_TAG=v2.5.9
ARG MAPNIK_GERMAN_L10N_REPO=https://github.com/giggls/mapnik-german-l10n.git
RUN set -eux ;\
apt-get -qq -y update ;\
##
## Install build dependencies
apt-get -qq -y --no-install-recommends install \
build-essential \
ca-certificates \
# Required by Nominatim to download data files
curl \
git \
pandoc \
# $PG_MAJOR is declared in postgres docker
postgresql-server-dev-$PG_MAJOR \
libkakasi2-dev \
libgdal-dev \
;\
##
## gzip extension
cd /opt/ ;\
git clone --quiet --depth 1 -b $PGSQL_GZIP_TAG $PGSQL_GZIP_REPO ;\
cd pgsql-gzip ;\
make ;\
make install ;\
rm -rf /opt/pgsql-gzip ;\
##
## UTF8Proc
cd /opt/ ;\
git clone --quiet --depth 1 -b $UTF8PROC_TAG $UTF8PROC_REPO ;\
cd utf8proc ;\
make ;\
make install ;\
ldconfig ;\
rm -rf /opt/utf8proc ;\
##
## osml10n extension (originally Mapnik German)
cd /opt/ ;\
git clone --quiet --depth 1 -b $MAPNIK_GERMAN_L10N_TAG $MAPNIK_GERMAN_L10N_REPO ;\
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 \
libpq-dev \
postgresql-server-dev-$PG_MAJOR \
libxml2-dev \
libjson-c-dev \
libgdal-dev \
;\
rm -rf /usr/local/lib/*.a ;\
rm -rf /var/lib/apt/lists/*
# The script should run after the parent's 10_postgis.sh runs
# so it must have the name that's listed after that.
COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/20_omt_postgis.sh