Skip to content

Commit b50183f

Browse files
authored
Update / README and template changes (#342)
* extend README with practical advices * update LABEL * update LABEL, add BASE_IMAGE; improve testing code * small edits * make update * fix alpine template * make update * add cunit-dev;git to alpine * make update * master: fix lto; and add cunit * make update
1 parent 8a3ed2b commit b50183f

File tree

16 files changed

+209
-58
lines changed

16 files changed

+209
-58
lines changed

11-3.3/Dockerfile

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44

55
FROM postgres:11-bullseye
66

7-
LABEL maintainer="PostGIS Project - https://postgis.net"
7+
LABEL maintainer="PostGIS Project - https://postgis.net" \
8+
org.opencontainers.image.description="PostGIS 3.3.2+dfsg-1.pgdg110+1 spatial database extension with PostgreSQL 11 bullseye" \
9+
org.opencontainers.image.source="https://github.com/postgis/docker-postgis"
810

911
ENV POSTGIS_MAJOR 3
1012
ENV POSTGIS_VERSION 3.3.2+dfsg-1.pgdg110+1

11-3.3/alpine/Dockerfile

+16-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
#
22
# NOTE: THIS DOCKERFILE IS GENERATED VIA "make update"! PLEASE DO NOT EDIT IT DIRECTLY.
33
#
4+
ARG BASE_IMAGE=postgres:11-alpine3.17
5+
FROM ${BASE_IMAGE}
46

5-
FROM postgres:11-alpine3.17
6-
7-
LABEL maintainer="PostGIS Project - https://postgis.net"
7+
LABEL maintainer="PostGIS Project - https://postgis.net" \
8+
org.opencontainers.image.description="PostGIS 3.3.2 spatial database extension with PostgreSQL 11 Alpine" \
9+
org.opencontainers.image.source="https://github.com/postgis/docker-postgis"
810

911
ENV POSTGIS_VERSION 3.3.2
1012
ENV POSTGIS_SHA256 2a6858d1df06de1c5f85a5b780773e92f6ba3a5dc09ac31120ac895242f5a77b
@@ -71,10 +73,12 @@ RUN set -eux \
7173
autoconf \
7274
automake \
7375
clang-dev \
76+
cunit-dev \
7477
file \
7578
g++ \
7679
gcc \
7780
gettext-dev \
81+
git \
7882
json-c-dev \
7983
libtool \
8084
libxml2-dev \
@@ -105,8 +109,17 @@ RUN set -eux \
105109
#&& make garden PGUSER=postgres \
106110
\
107111
&& su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis;"' \
112+
&& su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_raster;"' \
113+
## sfcgal expected with the next alpine release : 3.18
114+
#&& su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_sfcgal;"' \
115+
&& su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; --needed for postgis_tiger_geocoder "' \
116+
&& su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer;"' \
117+
&& su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer_data_us;"' \
118+
&& su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;"' \
119+
&& su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_topology;"' \
108120
&& su postgres -c 'psql -t -c "SELECT version();"' >> /_pgis_full_version.txt \
109121
&& su postgres -c 'psql -t -c "SELECT PostGIS_Full_Version();"' >> /_pgis_full_version.txt \
122+
&& su postgres -c 'psql -t -c "\dx"' >> /_pgis_full_version.txt \
110123
\
111124
&& su postgres -c 'pg_ctl -D /tempdb --mode=immediate stop' \
112125
&& rm -rf /tempdb \

12-3.3/Dockerfile

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44

55
FROM postgres:12-bullseye
66

7-
LABEL maintainer="PostGIS Project - https://postgis.net"
7+
LABEL maintainer="PostGIS Project - https://postgis.net" \
8+
org.opencontainers.image.description="PostGIS 3.3.2+dfsg-1.pgdg110+1 spatial database extension with PostgreSQL 12 bullseye" \
9+
org.opencontainers.image.source="https://github.com/postgis/docker-postgis"
810

911
ENV POSTGIS_MAJOR 3
1012
ENV POSTGIS_VERSION 3.3.2+dfsg-1.pgdg110+1

12-3.3/alpine/Dockerfile

+16-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
#
22
# NOTE: THIS DOCKERFILE IS GENERATED VIA "make update"! PLEASE DO NOT EDIT IT DIRECTLY.
33
#
4+
ARG BASE_IMAGE=postgres:12-alpine3.17
5+
FROM ${BASE_IMAGE}
46

5-
FROM postgres:12-alpine3.17
6-
7-
LABEL maintainer="PostGIS Project - https://postgis.net"
7+
LABEL maintainer="PostGIS Project - https://postgis.net" \
8+
org.opencontainers.image.description="PostGIS 3.3.2 spatial database extension with PostgreSQL 12 Alpine" \
9+
org.opencontainers.image.source="https://github.com/postgis/docker-postgis"
810

911
ENV POSTGIS_VERSION 3.3.2
1012
ENV POSTGIS_SHA256 2a6858d1df06de1c5f85a5b780773e92f6ba3a5dc09ac31120ac895242f5a77b
@@ -71,10 +73,12 @@ RUN set -eux \
7173
autoconf \
7274
automake \
7375
clang-dev \
76+
cunit-dev \
7477
file \
7578
g++ \
7679
gcc \
7780
gettext-dev \
81+
git \
7882
json-c-dev \
7983
libtool \
8084
libxml2-dev \
@@ -105,8 +109,17 @@ RUN set -eux \
105109
#&& make garden PGUSER=postgres \
106110
\
107111
&& su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis;"' \
112+
&& su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_raster;"' \
113+
## sfcgal expected with the next alpine release : 3.18
114+
#&& su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_sfcgal;"' \
115+
&& su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; --needed for postgis_tiger_geocoder "' \
116+
&& su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer;"' \
117+
&& su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer_data_us;"' \
118+
&& su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;"' \
119+
&& su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_topology;"' \
108120
&& su postgres -c 'psql -t -c "SELECT version();"' >> /_pgis_full_version.txt \
109121
&& su postgres -c 'psql -t -c "SELECT PostGIS_Full_Version();"' >> /_pgis_full_version.txt \
122+
&& su postgres -c 'psql -t -c "\dx"' >> /_pgis_full_version.txt \
110123
\
111124
&& su postgres -c 'pg_ctl -D /tempdb --mode=immediate stop' \
112125
&& rm -rf /tempdb \

13-3.3/Dockerfile

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44

55
FROM postgres:13-bullseye
66

7-
LABEL maintainer="PostGIS Project - https://postgis.net"
7+
LABEL maintainer="PostGIS Project - https://postgis.net" \
8+
org.opencontainers.image.description="PostGIS 3.3.2+dfsg-1.pgdg110+1 spatial database extension with PostgreSQL 13 bullseye" \
9+
org.opencontainers.image.source="https://github.com/postgis/docker-postgis"
810

911
ENV POSTGIS_MAJOR 3
1012
ENV POSTGIS_VERSION 3.3.2+dfsg-1.pgdg110+1

13-3.3/alpine/Dockerfile

+16-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
#
22
# NOTE: THIS DOCKERFILE IS GENERATED VIA "make update"! PLEASE DO NOT EDIT IT DIRECTLY.
33
#
4+
ARG BASE_IMAGE=postgres:13-alpine3.17
5+
FROM ${BASE_IMAGE}
46

5-
FROM postgres:13-alpine3.17
6-
7-
LABEL maintainer="PostGIS Project - https://postgis.net"
7+
LABEL maintainer="PostGIS Project - https://postgis.net" \
8+
org.opencontainers.image.description="PostGIS 3.3.2 spatial database extension with PostgreSQL 13 Alpine" \
9+
org.opencontainers.image.source="https://github.com/postgis/docker-postgis"
810

911
ENV POSTGIS_VERSION 3.3.2
1012
ENV POSTGIS_SHA256 2a6858d1df06de1c5f85a5b780773e92f6ba3a5dc09ac31120ac895242f5a77b
@@ -71,10 +73,12 @@ RUN set -eux \
7173
autoconf \
7274
automake \
7375
clang-dev \
76+
cunit-dev \
7477
file \
7578
g++ \
7679
gcc \
7780
gettext-dev \
81+
git \
7882
json-c-dev \
7983
libtool \
8084
libxml2-dev \
@@ -105,8 +109,17 @@ RUN set -eux \
105109
#&& make garden PGUSER=postgres \
106110
\
107111
&& su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis;"' \
112+
&& su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_raster;"' \
113+
## sfcgal expected with the next alpine release : 3.18
114+
#&& su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_sfcgal;"' \
115+
&& su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; --needed for postgis_tiger_geocoder "' \
116+
&& su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer;"' \
117+
&& su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer_data_us;"' \
118+
&& su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;"' \
119+
&& su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_topology;"' \
108120
&& su postgres -c 'psql -t -c "SELECT version();"' >> /_pgis_full_version.txt \
109121
&& su postgres -c 'psql -t -c "SELECT PostGIS_Full_Version();"' >> /_pgis_full_version.txt \
122+
&& su postgres -c 'psql -t -c "\dx"' >> /_pgis_full_version.txt \
110123
\
111124
&& su postgres -c 'pg_ctl -D /tempdb --mode=immediate stop' \
112125
&& rm -rf /tempdb \

14-3.3/Dockerfile

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44

55
FROM postgres:14-bullseye
66

7-
LABEL maintainer="PostGIS Project - https://postgis.net"
7+
LABEL maintainer="PostGIS Project - https://postgis.net" \
8+
org.opencontainers.image.description="PostGIS 3.3.2+dfsg-1.pgdg110+1 spatial database extension with PostgreSQL 14 bullseye" \
9+
org.opencontainers.image.source="https://github.com/postgis/docker-postgis"
810

911
ENV POSTGIS_MAJOR 3
1012
ENV POSTGIS_VERSION 3.3.2+dfsg-1.pgdg110+1

14-3.3/alpine/Dockerfile

+16-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
#
22
# NOTE: THIS DOCKERFILE IS GENERATED VIA "make update"! PLEASE DO NOT EDIT IT DIRECTLY.
33
#
4+
ARG BASE_IMAGE=postgres:14-alpine3.17
5+
FROM ${BASE_IMAGE}
46

5-
FROM postgres:14-alpine3.17
6-
7-
LABEL maintainer="PostGIS Project - https://postgis.net"
7+
LABEL maintainer="PostGIS Project - https://postgis.net" \
8+
org.opencontainers.image.description="PostGIS 3.3.2 spatial database extension with PostgreSQL 14 Alpine" \
9+
org.opencontainers.image.source="https://github.com/postgis/docker-postgis"
810

911
ENV POSTGIS_VERSION 3.3.2
1012
ENV POSTGIS_SHA256 2a6858d1df06de1c5f85a5b780773e92f6ba3a5dc09ac31120ac895242f5a77b
@@ -71,10 +73,12 @@ RUN set -eux \
7173
autoconf \
7274
automake \
7375
clang-dev \
76+
cunit-dev \
7477
file \
7578
g++ \
7679
gcc \
7780
gettext-dev \
81+
git \
7882
json-c-dev \
7983
libtool \
8084
libxml2-dev \
@@ -105,8 +109,17 @@ RUN set -eux \
105109
#&& make garden PGUSER=postgres \
106110
\
107111
&& su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis;"' \
112+
&& su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_raster;"' \
113+
## sfcgal expected with the next alpine release : 3.18
114+
#&& su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_sfcgal;"' \
115+
&& su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; --needed for postgis_tiger_geocoder "' \
116+
&& su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer;"' \
117+
&& su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer_data_us;"' \
118+
&& su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;"' \
119+
&& su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_topology;"' \
108120
&& su postgres -c 'psql -t -c "SELECT version();"' >> /_pgis_full_version.txt \
109121
&& su postgres -c 'psql -t -c "SELECT PostGIS_Full_Version();"' >> /_pgis_full_version.txt \
122+
&& su postgres -c 'psql -t -c "\dx"' >> /_pgis_full_version.txt \
110123
\
111124
&& su postgres -c 'pg_ctl -D /tempdb --mode=immediate stop' \
112125
&& rm -rf /tempdb \

14-master/Dockerfile

+14-12
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@
88
ARG DOCKER_CMAKE_BUILD_TYPE=Release
99
FROM postgres:14-bullseye as builder
1010

11-
LABEL maintainer="PostGIS Project - https://postgis.net"
12-
LABEL org.opencontainers.image.source="https://github.com/postgis/docker-postgis"
11+
LABEL maintainer="PostGIS Project - https://postgis.net" \
12+
org.opencontainers.image.description="PostGIS - master spatial database extension with PostgreSQL 14 bullseye" \
13+
org.opencontainers.image.source="https://github.com/postgis/docker-postgis"
1314

1415
WORKDIR /
1516

@@ -85,7 +86,7 @@ ENV DOCKER_CMAKE_BUILD_TYPE=${DOCKER_CMAKE_BUILD_TYPE}
8586
# By utilizing the latest commit of the CGAL 5.5.x-branch and implementing a header-only build for SFCGAL,
8687
# one can benefit from the latest CGAL patches while avoiding compatibility issues.
8788
ENV CGAL_GIT_BRANCH 5.5.x-branch
88-
ENV CGAL55_GIT_HASH b4c04b53e0b9479e568fc76830976e281d02c9b4
89+
ENV CGAL55_GIT_HASH 65802d87aa16308a5ef1472e4b674c3bf7293da3
8990
ENV SFCGAL_GIT_HASH df3c2ccc015d4a85ac672fc307d2c7c324cccca7
9091
RUN set -ex \
9192
&& mkdir -p /usr/src \
@@ -119,7 +120,7 @@ RUN set -ex \
119120
&& rm -fr /usr/src/cgal
120121

121122
# proj
122-
ENV PROJ_GIT_HASH c31146bee252d5b8bf4dc0b35168ab5e3ddf94b9
123+
ENV PROJ_GIT_HASH 700721eeafd239112f289bba12d08fc8844c376d
123124
RUN set -ex \
124125
&& cd /usr/src \
125126
&& git clone https://github.com/OSGeo/PROJ.git \
@@ -149,7 +150,7 @@ RUN set -ex \
149150
&& rm -fr /usr/src/PROJ
150151

151152
# geos
152-
ENV GEOS_GIT_HASH c54752f9d4d44e35ac4015cbb8dd47ddb36611bf
153+
ENV GEOS_GIT_HASH 7d20b1772d57c8eba1c12902c812dae9bf58307b
153154
RUN set -ex \
154155
&& cd /usr/src \
155156
&& git clone https://github.com/libgeos/geos.git \
@@ -165,7 +166,7 @@ RUN set -ex \
165166
&& rm -fr /usr/src/geos
166167

167168
# gdal
168-
ENV GDAL_GIT_HASH 67eaa768c017a21200c7acd9c208d104efea512d
169+
ENV GDAL_GIT_HASH 717dcc0eed252e2f78c142b1f7866e49c5511224
169170
RUN set -ex \
170171
&& cd /usr/src \
171172
&& git clone https://github.com/OSGeo/gdal.git \
@@ -297,11 +298,11 @@ COPY --from=builder /_pgis*.* /
297298
COPY --from=builder /usr/local /usr/local
298299

299300
ENV CGAL_GIT_BRANCH 5.5.x-branch
300-
ENV CGAL55_GIT_HASH b4c04b53e0b9479e568fc76830976e281d02c9b4
301+
ENV CGAL55_GIT_HASH 65802d87aa16308a5ef1472e4b674c3bf7293da3
301302
ENV SFCGAL_GIT_HASH df3c2ccc015d4a85ac672fc307d2c7c324cccca7
302-
ENV PROJ_GIT_HASH c31146bee252d5b8bf4dc0b35168ab5e3ddf94b9
303-
ENV GEOS_GIT_HASH c54752f9d4d44e35ac4015cbb8dd47ddb36611bf
304-
ENV GDAL_GIT_HASH 67eaa768c017a21200c7acd9c208d104efea512d
303+
ENV PROJ_GIT_HASH 700721eeafd239112f289bba12d08fc8844c376d
304+
ENV GEOS_GIT_HASH 7d20b1772d57c8eba1c12902c812dae9bf58307b
305+
ENV GDAL_GIT_HASH 717dcc0eed252e2f78c142b1f7866e49c5511224
305306

306307
# Minimal command line test ( fail fast )
307308
RUN set -ex \
@@ -320,7 +321,7 @@ RUN set -ex \
320321
|| echo "ogr2ogr missing PostgreSQL driver" && exit 1
321322

322323
# install postgis
323-
ENV POSTGIS_GIT_HASH 0a7d3bc20498532464c9064a4c75912f842f565f
324+
ENV POSTGIS_GIT_HASH 1fc0c62f9bde0d09c6e716755980e159730c231d
324325

325326
RUN set -ex \
326327
&& apt-get update \
@@ -335,6 +336,7 @@ RUN set -ex \
335336
g++ \
336337
git \
337338
libboost-all-dev \
339+
libcunit1-dev \
338340
libcurl4-gnutls-dev \
339341
libgmp-dev \
340342
libjson-c-dev \
@@ -363,7 +365,7 @@ RUN set -ex \
363365
&& ./configure \
364366
# --with-gui \
365367
--with-pcredir="$(pcre-config --prefix)" \
366-
--with-lto \
368+
--enable-lto \
367369
&& make -j$(nproc) \
368370
&& make install \
369371
# refresh proj data - workarounds: https://trac.osgeo.org/postgis/ticket/5316

15-3.3/Dockerfile

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44

55
FROM postgres:15-bullseye
66

7-
LABEL maintainer="PostGIS Project - https://postgis.net"
7+
LABEL maintainer="PostGIS Project - https://postgis.net" \
8+
org.opencontainers.image.description="PostGIS 3.3.2+dfsg-1.pgdg110+1 spatial database extension with PostgreSQL 15 bullseye" \
9+
org.opencontainers.image.source="https://github.com/postgis/docker-postgis"
810

911
ENV POSTGIS_MAJOR 3
1012
ENV POSTGIS_VERSION 3.3.2+dfsg-1.pgdg110+1

15-3.3/alpine/Dockerfile

+16-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
#
22
# NOTE: THIS DOCKERFILE IS GENERATED VIA "make update"! PLEASE DO NOT EDIT IT DIRECTLY.
33
#
4+
ARG BASE_IMAGE=postgres:15-alpine3.17
5+
FROM ${BASE_IMAGE}
46

5-
FROM postgres:15-alpine3.17
6-
7-
LABEL maintainer="PostGIS Project - https://postgis.net"
7+
LABEL maintainer="PostGIS Project - https://postgis.net" \
8+
org.opencontainers.image.description="PostGIS 3.3.2 spatial database extension with PostgreSQL 15 Alpine" \
9+
org.opencontainers.image.source="https://github.com/postgis/docker-postgis"
810

911
ENV POSTGIS_VERSION 3.3.2
1012
ENV POSTGIS_SHA256 2a6858d1df06de1c5f85a5b780773e92f6ba3a5dc09ac31120ac895242f5a77b
@@ -71,10 +73,12 @@ RUN set -eux \
7173
autoconf \
7274
automake \
7375
clang-dev \
76+
cunit-dev \
7477
file \
7578
g++ \
7679
gcc \
7780
gettext-dev \
81+
git \
7882
json-c-dev \
7983
libtool \
8084
libxml2-dev \
@@ -105,8 +109,17 @@ RUN set -eux \
105109
#&& make garden PGUSER=postgres \
106110
\
107111
&& su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis;"' \
112+
&& su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_raster;"' \
113+
## sfcgal expected with the next alpine release : 3.18
114+
#&& su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_sfcgal;"' \
115+
&& su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; --needed for postgis_tiger_geocoder "' \
116+
&& su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer;"' \
117+
&& su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer_data_us;"' \
118+
&& su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;"' \
119+
&& su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_topology;"' \
108120
&& su postgres -c 'psql -t -c "SELECT version();"' >> /_pgis_full_version.txt \
109121
&& su postgres -c 'psql -t -c "SELECT PostGIS_Full_Version();"' >> /_pgis_full_version.txt \
122+
&& su postgres -c 'psql -t -c "\dx"' >> /_pgis_full_version.txt \
110123
\
111124
&& su postgres -c 'pg_ctl -D /tempdb --mode=immediate stop' \
112125
&& rm -rf /tempdb \

0 commit comments

Comments
 (0)