Skip to content

Commit 27f716f

Browse files
authored
Add pcre library to templates, pcre is a dependency for address_standardizer extension (#220)
* added pcre to templates, needed for address_standardizer extension * removed a typo * updated all Dockerfiles by running make * updated master template with proj temp fix and generated the dockerfiles * fixed goes commit as temp fix, added test address_standardizer test case * added libpcre3/pcre to final build * forgot to run make update before commiting last time
1 parent f4ecaee commit 27f716f

File tree

16 files changed

+124
-28
lines changed

16 files changed

+124
-28
lines changed

10-2.5/alpine/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,14 @@ RUN set -ex \
3939
llvm10-dev \
4040
proj-dev \
4141
protobuf-c-dev \
42+
pcre-dev \
4243
&& cd /usr/src/postgis \
4344
&& ./autogen.sh \
4445
# configure options taken from:
4546
# https://anonscm.debian.org/cgit/pkg-grass/postgis.git/tree/debian/rules?h=jessie
4647
&& ./configure \
4748
# --with-gui \
49+
--with-pcredir="$(pcre-config --prefix)" \
4850
&& make -j$(nproc) \
4951
&& make install \
5052
# regress check
@@ -63,6 +65,7 @@ RUN set -ex \
6365
geos \
6466
gdal \
6567
proj \
68+
pcre \
6669
libstdc++ \
6770
protobuf-c \
6871
# clean

10-3.1/alpine/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,14 @@ RUN set -ex \
3939
llvm10-dev \
4040
proj-dev \
4141
protobuf-c-dev \
42+
pcre-dev \
4243
&& cd /usr/src/postgis \
4344
&& ./autogen.sh \
4445
# configure options taken from:
4546
# https://anonscm.debian.org/cgit/pkg-grass/postgis.git/tree/debian/rules?h=jessie
4647
&& ./configure \
4748
# --with-gui \
49+
--with-pcredir="$(pcre-config --prefix)" \
4850
&& make -j$(nproc) \
4951
&& make install \
5052
# regress check
@@ -63,6 +65,7 @@ RUN set -ex \
6365
geos \
6466
gdal \
6567
proj \
68+
pcre \
6669
libstdc++ \
6770
protobuf-c \
6871
# clean

11-2.5/alpine/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,14 @@ RUN set -ex \
3939
llvm10-dev \
4040
proj-dev \
4141
protobuf-c-dev \
42+
pcre-dev \
4243
&& cd /usr/src/postgis \
4344
&& ./autogen.sh \
4445
# configure options taken from:
4546
# https://anonscm.debian.org/cgit/pkg-grass/postgis.git/tree/debian/rules?h=jessie
4647
&& ./configure \
4748
# --with-gui \
49+
--with-pcredir="$(pcre-config --prefix)" \
4850
&& make -j$(nproc) \
4951
&& make install \
5052
# regress check
@@ -63,6 +65,7 @@ RUN set -ex \
6365
geos \
6466
gdal \
6567
proj \
68+
pcre \
6669
libstdc++ \
6770
protobuf-c \
6871
# clean

11-3.1/alpine/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,14 @@ RUN set -ex \
3939
llvm10-dev \
4040
proj-dev \
4141
protobuf-c-dev \
42+
pcre-dev \
4243
&& cd /usr/src/postgis \
4344
&& ./autogen.sh \
4445
# configure options taken from:
4546
# https://anonscm.debian.org/cgit/pkg-grass/postgis.git/tree/debian/rules?h=jessie
4647
&& ./configure \
4748
# --with-gui \
49+
--with-pcredir="$(pcre-config --prefix)" \
4850
&& make -j$(nproc) \
4951
&& make install \
5052
# regress check
@@ -63,6 +65,7 @@ RUN set -ex \
6365
geos \
6466
gdal \
6567
proj \
68+
pcre \
6669
libstdc++ \
6770
protobuf-c \
6871
# clean

12-2.5/alpine/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,14 @@ RUN set -ex \
3939
llvm10-dev \
4040
proj-dev \
4141
protobuf-c-dev \
42+
pcre-dev \
4243
&& cd /usr/src/postgis \
4344
&& ./autogen.sh \
4445
# configure options taken from:
4546
# https://anonscm.debian.org/cgit/pkg-grass/postgis.git/tree/debian/rules?h=jessie
4647
&& ./configure \
4748
# --with-gui \
49+
--with-pcredir="$(pcre-config --prefix)" \
4850
&& make -j$(nproc) \
4951
&& make install \
5052
# regress check
@@ -63,6 +65,7 @@ RUN set -ex \
6365
geos \
6466
gdal \
6567
proj \
68+
pcre \
6669
libstdc++ \
6770
protobuf-c \
6871
# clean

12-3.1/alpine/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,14 @@ RUN set -ex \
3939
llvm10-dev \
4040
proj-dev \
4141
protobuf-c-dev \
42+
pcre-dev \
4243
&& cd /usr/src/postgis \
4344
&& ./autogen.sh \
4445
# configure options taken from:
4546
# https://anonscm.debian.org/cgit/pkg-grass/postgis.git/tree/debian/rules?h=jessie
4647
&& ./configure \
4748
# --with-gui \
49+
--with-pcredir="$(pcre-config --prefix)" \
4850
&& make -j$(nproc) \
4951
&& make install \
5052
# regress check
@@ -63,6 +65,7 @@ RUN set -ex \
6365
geos \
6466
gdal \
6567
proj \
68+
pcre \
6669
libstdc++ \
6770
protobuf-c \
6871
# clean

12-master/Dockerfile

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ RUN set -ex \
5656
make \
5757
pkg-config \
5858
protobuf-c-compiler \
59-
xsltproc
59+
xsltproc \
60+
libpcre3-dev
6061

6162
# sfcgal
6263
ENV SFCGAL_VERSION master
@@ -76,9 +77,15 @@ RUN set -ex \
7677
&& cd / \
7778
&& rm -fr /usr/src/SFCGAL
7879

79-
# proj4
80-
ENV PROJ_VERSION master
81-
ENV PROJ_GIT_HASH 28aa4f13095eb69438d47f30663f13bd8780c0c1
80+
# proj
81+
###ENV PROJ_VERSION master
82+
###ENV PROJ_GIT_HASH db2950e56ea26a0949b71378d73559a16fc40f26
83+
84+
### Issue with proj v8 not being compatible
85+
### see https://github.com/postgis/docker-postgis/pull/220#issuecomment-765864268
86+
### Below is a temp fix
87+
ENV PROJ_VERSION 7.2.1
88+
ENV PROJ_GIT_HASH 1212e9b818e4511cc9389b9bdb5daa0bec1a12bd
8289

8390
RUN set -ex \
8491
&& cd /usr/src \
@@ -94,23 +101,27 @@ RUN set -ex \
94101

95102
# geos
96103
ENV GEOS_VERSION master
97-
ENV GEOS_GIT_HASH c8e3fe8ae24a47790e063d4a64a34d99b71448d7
104+
###ENV GEOS_GIT_HASH 17ab55a55aeed3e5a0a83b05428463bf1646471f
105+
### lock Commits on Jan 19, 2021
106+
### temp fix, see https://github.com/postgis/docker-postgis/pull/220#issuecomment-770156316
107+
ENV GEOS_GIT_HASH 98641ab14e01a6b5a6339f49fa6f1bee4424c7d0
98108

99109
RUN set -ex \
100110
&& cd /usr/src \
101111
&& git clone https://github.com/libgeos/geos.git \
102112
&& cd geos \
103113
&& git checkout ${GEOS_GIT_HASH} \
104-
&& ./autogen.sh \
105-
&& ./configure --disable-static \
114+
&& mkdir cmake-build \
115+
&& cd cmake-build \
116+
&& cmake -DCMAKE_BUILD_TYPE=Release .. \
106117
&& make -j$(nproc) \
107118
&& make install \
108119
&& cd / \
109120
&& rm -fr /usr/src/geos
110121

111122
# gdal
112123
ENV GDAL_VERSION master
113-
ENV GDAL_GIT_HASH b0a16e6a601ea49a1b7e7dd2039f50b1a0a0f061
124+
ENV GDAL_GIT_HASH ae1531a20a4079fc0739676a3c01c760f674bbf6
114125

115126
RUN set -ex \
116127
&& cd /usr/src \
@@ -133,7 +144,8 @@ RUN set -ex \
133144
&& geos-config --version \
134145
&& ogr2ogr --version \
135146
&& proj \
136-
&& sfcgal-config --version
147+
&& sfcgal-config --version \
148+
&& pcre-config --version
137149

138150
FROM postgres:12
139151

@@ -162,6 +174,7 @@ RUN set -ex \
162174
libtiff5 \
163175
libxml2 \
164176
sqlite3 \
177+
libpcre3 \
165178
&& rm -rf /var/lib/apt/lists/*
166179

167180
COPY --from=builder /usr/local /usr/local
@@ -178,7 +191,7 @@ RUN set -ex \
178191

179192
# install postgis
180193
ENV POSTGIS_VERSION master
181-
ENV POSTGIS_GIT_HASH c0a97f9f80ae7af95403213fbd55ec9829dbbfc5
194+
ENV POSTGIS_GIT_HASH 52f942583b5b9c975799bf8eefadc756a5f56215
182195

183196
RUN set -ex \
184197
&& apt-get update \
@@ -198,6 +211,7 @@ RUN set -ex \
198211
libgmp-dev \
199212
libjson-c-dev \
200213
libmpfr-dev \
214+
libpcre3-dev \
201215
libprotobuf-c-dev \
202216
libsqlite3-dev \
203217
libtiff-dev \
@@ -219,6 +233,7 @@ RUN set -ex \
219233
# https://anonscm.debian.org/cgit/pkg-grass/postgis.git/tree/debian/rules?h=jessie
220234
&& ./configure \
221235
# --with-gui \
236+
--with-pcredir="$(pcre-config --prefix)" \
222237
&& make -j$(nproc) \
223238
&& make install \
224239
# regress check
@@ -256,6 +271,7 @@ RUN set -ex \
256271
libtiff-dev \
257272
libtool \
258273
libxml2-dev \
274+
libpcre3-dev \
259275
make \
260276
pkg-config \
261277
postgresql-server-dev-$PG_MAJOR \

13-3.1/alpine/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,14 @@ RUN set -ex \
3939
llvm10-dev \
4040
proj-dev \
4141
protobuf-c-dev \
42+
pcre-dev \
4243
&& cd /usr/src/postgis \
4344
&& ./autogen.sh \
4445
# configure options taken from:
4546
# https://anonscm.debian.org/cgit/pkg-grass/postgis.git/tree/debian/rules?h=jessie
4647
&& ./configure \
4748
# --with-gui \
49+
--with-pcredir="$(pcre-config --prefix)" \
4850
&& make -j$(nproc) \
4951
&& make install \
5052
# regress check
@@ -63,6 +65,7 @@ RUN set -ex \
6365
geos \
6466
gdal \
6567
proj \
68+
pcre \
6669
libstdc++ \
6770
protobuf-c \
6871
# clean

13-master/Dockerfile

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ RUN set -ex \
5656
make \
5757
pkg-config \
5858
protobuf-c-compiler \
59-
xsltproc
59+
xsltproc \
60+
libpcre3-dev
6061

6162
# sfcgal
6263
ENV SFCGAL_VERSION master
@@ -76,9 +77,15 @@ RUN set -ex \
7677
&& cd / \
7778
&& rm -fr /usr/src/SFCGAL
7879

79-
# proj4
80-
ENV PROJ_VERSION master
81-
ENV PROJ_GIT_HASH 28aa4f13095eb69438d47f30663f13bd8780c0c1
80+
# proj
81+
###ENV PROJ_VERSION master
82+
###ENV PROJ_GIT_HASH db2950e56ea26a0949b71378d73559a16fc40f26
83+
84+
### Issue with proj v8 not being compatible
85+
### see https://github.com/postgis/docker-postgis/pull/220#issuecomment-765864268
86+
### Below is a temp fix
87+
ENV PROJ_VERSION 7.2.1
88+
ENV PROJ_GIT_HASH 1212e9b818e4511cc9389b9bdb5daa0bec1a12bd
8289

8390
RUN set -ex \
8491
&& cd /usr/src \
@@ -94,23 +101,27 @@ RUN set -ex \
94101

95102
# geos
96103
ENV GEOS_VERSION master
97-
ENV GEOS_GIT_HASH c8e3fe8ae24a47790e063d4a64a34d99b71448d7
104+
###ENV GEOS_GIT_HASH 17ab55a55aeed3e5a0a83b05428463bf1646471f
105+
### lock Commits on Jan 19, 2021
106+
### temp fix, see https://github.com/postgis/docker-postgis/pull/220#issuecomment-770156316
107+
ENV GEOS_GIT_HASH 98641ab14e01a6b5a6339f49fa6f1bee4424c7d0
98108

99109
RUN set -ex \
100110
&& cd /usr/src \
101111
&& git clone https://github.com/libgeos/geos.git \
102112
&& cd geos \
103113
&& git checkout ${GEOS_GIT_HASH} \
104-
&& ./autogen.sh \
105-
&& ./configure --disable-static \
114+
&& mkdir cmake-build \
115+
&& cd cmake-build \
116+
&& cmake -DCMAKE_BUILD_TYPE=Release .. \
106117
&& make -j$(nproc) \
107118
&& make install \
108119
&& cd / \
109120
&& rm -fr /usr/src/geos
110121

111122
# gdal
112123
ENV GDAL_VERSION master
113-
ENV GDAL_GIT_HASH b0a16e6a601ea49a1b7e7dd2039f50b1a0a0f061
124+
ENV GDAL_GIT_HASH ae1531a20a4079fc0739676a3c01c760f674bbf6
114125

115126
RUN set -ex \
116127
&& cd /usr/src \
@@ -133,7 +144,8 @@ RUN set -ex \
133144
&& geos-config --version \
134145
&& ogr2ogr --version \
135146
&& proj \
136-
&& sfcgal-config --version
147+
&& sfcgal-config --version \
148+
&& pcre-config --version
137149

138150
FROM postgres:13
139151

@@ -162,6 +174,7 @@ RUN set -ex \
162174
libtiff5 \
163175
libxml2 \
164176
sqlite3 \
177+
libpcre3 \
165178
&& rm -rf /var/lib/apt/lists/*
166179

167180
COPY --from=builder /usr/local /usr/local
@@ -178,7 +191,7 @@ RUN set -ex \
178191

179192
# install postgis
180193
ENV POSTGIS_VERSION master
181-
ENV POSTGIS_GIT_HASH c0a97f9f80ae7af95403213fbd55ec9829dbbfc5
194+
ENV POSTGIS_GIT_HASH 52f942583b5b9c975799bf8eefadc756a5f56215
182195

183196
RUN set -ex \
184197
&& apt-get update \
@@ -198,6 +211,7 @@ RUN set -ex \
198211
libgmp-dev \
199212
libjson-c-dev \
200213
libmpfr-dev \
214+
libpcre3-dev \
201215
libprotobuf-c-dev \
202216
libsqlite3-dev \
203217
libtiff-dev \
@@ -219,6 +233,7 @@ RUN set -ex \
219233
# https://anonscm.debian.org/cgit/pkg-grass/postgis.git/tree/debian/rules?h=jessie
220234
&& ./configure \
221235
# --with-gui \
236+
--with-pcredir="$(pcre-config --prefix)" \
222237
&& make -j$(nproc) \
223238
&& make install \
224239
# regress check
@@ -256,6 +271,7 @@ RUN set -ex \
256271
libtiff-dev \
257272
libtool \
258273
libxml2-dev \
274+
libpcre3-dev \
259275
make \
260276
pkg-config \
261277
postgresql-server-dev-$PG_MAJOR \

0 commit comments

Comments
 (0)