Skip to content

Commit 7617892

Browse files
committed
chore: install PostGIS's address_standardizer extension from its own repo
Signed-off-by: Niccolò Fei <niccolo.fei@enterprisedb.com>
1 parent 2cfcd43 commit 7617892

2 files changed

Lines changed: 16 additions & 2 deletions

File tree

Dockerfile

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,8 @@ FROM standard AS postgis
127127
USER root
128128
ARG POSTGIS_REPO=https://github.com/postgis/postgis.git
129129
ARG POSTGIS_BRANCH=master
130+
ARG ADDRESS_STANDARDIZER_REPO=https://github.com/postgis/address_standardizer.git
131+
ARG ADDRESS_STANDARDIZER_BRANCH=main
130132

131133
RUN apt-get update && \
132134
apt-get install -y --no-install-recommends \
@@ -137,16 +139,27 @@ RUN apt-get update && \
137139
libgdal36 \
138140
libgeos-c1t64 \
139141
libsfcgal2 \
142+
# address_standardizer
143+
libpcre2-8-0 \
144+
libpcre2-posix3 \
140145
&& \
146+
# PostGIS
141147
mkdir -p /usr/src/postgis && \
142148
git clone -b "$POSTGIS_BRANCH" --single-branch "$POSTGIS_REPO" /usr/src/postgis && \
143149
cd /usr/src/postgis && \
144150
./autogen.sh && \
145151
./configure --with-pgconfig=/usr/lib/postgresql/$PG_MAJOR/bin/pg_config --with-sfcgal && \
146152
make -j$(nproc) && \
147153
make install && \
154+
# address_standardizer
155+
mkdir -p /usr/src/address_standardizer && \
156+
git clone -b "$ADDRESS_STANDARDIZER_BRANCH" --single-branch "$ADDRESS_STANDARDIZER_REPO" /usr/src/address_standardizer && \
157+
cd /usr/src/address_standardizer && \
158+
make && \
159+
make install && \
160+
# Cleanup
148161
apt-get purge -y --auto-remove $(cat /build-deps.txt) && \
149162
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false && \
150-
rm -rf /var/lib/apt/lists/* /var/cache/* /var/log/* /usr/src/postgis
163+
rm -rf /var/lib/apt/lists/* /var/cache/* /var/log/* /usr/src/postgis /usr/src/address_standardizer
151164

152165
USER 26

build-deps.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ bison
44
build-essential
55
clang-19
66
cmake
7-
docbook5-xml
87
docbook-xml
8+
docbook5-xml
99
flex
1010
gettext
1111
git
@@ -23,6 +23,7 @@ libldap-dev
2323
liblz4-dev
2424
libnuma-dev
2525
libpam0g-dev
26+
libpcre2-dev
2627
libperl-dev
2728
libproj-dev
2829
libprotobuf-c-dev

0 commit comments

Comments
 (0)