Skip to content

Commit

Permalink
Upgrade to Postgis 3.3.4 / 3.4.0beta2 + related changes (#352)
Browse files Browse the repository at this point in the history
* Upgrade to Postgis 3.3.4 + related changes

Changes to be committed:
	modified:   .github/workflows/main.yml
	modified:   11-3.3/Dockerfile
	modified:   11-3.3/alpine/Dockerfile
	modified:   12-3.3/Dockerfile
	modified:   12-3.3/alpine/Dockerfile
	modified:   13-3.3/Dockerfile
	modified:   13-3.3/alpine/Dockerfile
	modified:   14-3.3/Dockerfile
	modified:   14-3.3/alpine/Dockerfile
	modified:   14-master/Dockerfile
	modified:   15-3.3/Dockerfile
	modified:   15-3.3/alpine/Dockerfile
	modified:   15-master/Dockerfile
        deleted:    16beta2-3.3.3/Dockerfile
	new file:   16beta2-3.3/Dockerfile
	renamed:    16beta2-3.3.3/alpine/Dockerfile -> 16beta2-3.3/alpine/Dockerfile
	renamed:    16beta2-3.3.3/alpine/initdb-postgis.sh -> 16beta2-3.3/alpine/initdb-postgis.sh
	renamed:    16beta2-3.3.3/alpine/update-postgis.sh -> 16beta2-3.3/alpine/update-postgis.sh
	new file:   16beta2-3.3/initdb-postgis.sh
	new file:   16beta2-3.3/update-postgis.sh
	modified:   16beta2-master/Dockerfile
	modified:   README.md

* Add 3.4.0beta2 test images ( alpine only )

Changes to be committed:
	modified:   .github/workflows/main.yml
	new file:   15-3.4.0beta2/Dockerfile
	new file:   15-3.4.0beta2/alpine/Dockerfile
	new file:   15-3.4.0beta2/alpine/initdb-postgis.sh
	new file:   15-3.4.0beta2/alpine/update-postgis.sh
	new file:   16beta2-3.4.0beta2/Dockerfile
	new file:   16beta2-3.4.0beta2/alpine/Dockerfile
	new file:   16beta2-3.4.0beta2/alpine/initdb-postgis.sh
	new file:   16beta2-3.4.0beta2/alpine/update-postgis.sh
	modified:   README.md
	modified:   update.sh
  • Loading branch information
ImreSamu authored Jul 29, 2023
1 parent baa1c86 commit 4e1bf4e
Show file tree
Hide file tree
Showing 30 changed files with 512 additions and 69 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
make-docker-images:
strategy:
matrix:
postgres: [11, 12, 13, 14, 15]
postgres: [11, 12, 13, 14, 15, 16beta2]
postgis: ['3.3']
variant: [default, alpine]
include:
Expand All @@ -28,8 +28,11 @@ jobs:
- postgres: 16beta2
postgis: master
variant: default
- postgres: 15
postgis: 3.4.0beta2
variant: alpine
- postgres: 16beta2
postgis: 3.3.3
postgis: 3.4.0beta2
variant: alpine

name: Build docker image for ${{ matrix.postgres }}-${{ matrix.postgis }} variant ${{ matrix.variant }}
Expand Down
4 changes: 2 additions & 2 deletions 11-3.3/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
FROM postgres:11-bullseye

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

ENV POSTGIS_MAJOR 3
ENV POSTGIS_VERSION 3.3.3+dfsg-1.pgdg110+1
ENV POSTGIS_VERSION 3.3.4+dfsg-1.pgdg110+1

RUN apt-get update \
&& apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \
Expand Down
6 changes: 3 additions & 3 deletions 11-3.3/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ ARG BASE_IMAGE=postgres:11-alpine3.18
FROM ${BASE_IMAGE}

LABEL maintainer="PostGIS Project - https://postgis.net" \
org.opencontainers.image.description="PostGIS 3.3.3 spatial database extension with PostgreSQL 11 Alpine" \
org.opencontainers.image.description="PostGIS 3.3.4 spatial database extension with PostgreSQL 11 Alpine" \
org.opencontainers.image.source="https://github.com/postgis/docker-postgis"

ENV POSTGIS_VERSION 3.3.3
ENV POSTGIS_SHA256 441bb33bd2be362c7c463161207f290a1c25083027a069322696eeec74fc916b
ENV POSTGIS_VERSION 3.3.4
ENV POSTGIS_SHA256 68507aa4ab7f9f7218fcefdcdd989911415e5f670128eb33acbbb362a24a998e

RUN set -eux \
&& apk add --no-cache --virtual .fetch-deps \
Expand Down
4 changes: 2 additions & 2 deletions 12-3.3/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
FROM postgres:12-bullseye

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

ENV POSTGIS_MAJOR 3
ENV POSTGIS_VERSION 3.3.3+dfsg-1.pgdg110+1
ENV POSTGIS_VERSION 3.3.4+dfsg-1.pgdg110+1

RUN apt-get update \
&& apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \
Expand Down
6 changes: 3 additions & 3 deletions 12-3.3/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ ARG BASE_IMAGE=postgres:12-alpine3.18
FROM ${BASE_IMAGE}

LABEL maintainer="PostGIS Project - https://postgis.net" \
org.opencontainers.image.description="PostGIS 3.3.3 spatial database extension with PostgreSQL 12 Alpine" \
org.opencontainers.image.description="PostGIS 3.3.4 spatial database extension with PostgreSQL 12 Alpine" \
org.opencontainers.image.source="https://github.com/postgis/docker-postgis"

ENV POSTGIS_VERSION 3.3.3
ENV POSTGIS_SHA256 441bb33bd2be362c7c463161207f290a1c25083027a069322696eeec74fc916b
ENV POSTGIS_VERSION 3.3.4
ENV POSTGIS_SHA256 68507aa4ab7f9f7218fcefdcdd989911415e5f670128eb33acbbb362a24a998e

RUN set -eux \
&& apk add --no-cache --virtual .fetch-deps \
Expand Down
4 changes: 2 additions & 2 deletions 13-3.3/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
FROM postgres:13-bullseye

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

ENV POSTGIS_MAJOR 3
ENV POSTGIS_VERSION 3.3.3+dfsg-1.pgdg110+1
ENV POSTGIS_VERSION 3.3.4+dfsg-1.pgdg110+1

RUN apt-get update \
&& apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \
Expand Down
6 changes: 3 additions & 3 deletions 13-3.3/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ ARG BASE_IMAGE=postgres:13-alpine3.18
FROM ${BASE_IMAGE}

LABEL maintainer="PostGIS Project - https://postgis.net" \
org.opencontainers.image.description="PostGIS 3.3.3 spatial database extension with PostgreSQL 13 Alpine" \
org.opencontainers.image.description="PostGIS 3.3.4 spatial database extension with PostgreSQL 13 Alpine" \
org.opencontainers.image.source="https://github.com/postgis/docker-postgis"

ENV POSTGIS_VERSION 3.3.3
ENV POSTGIS_SHA256 441bb33bd2be362c7c463161207f290a1c25083027a069322696eeec74fc916b
ENV POSTGIS_VERSION 3.3.4
ENV POSTGIS_SHA256 68507aa4ab7f9f7218fcefdcdd989911415e5f670128eb33acbbb362a24a998e

RUN set -eux \
&& apk add --no-cache --virtual .fetch-deps \
Expand Down
4 changes: 2 additions & 2 deletions 14-3.3/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
FROM postgres:14-bullseye

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

ENV POSTGIS_MAJOR 3
ENV POSTGIS_VERSION 3.3.3+dfsg-1.pgdg110+1
ENV POSTGIS_VERSION 3.3.4+dfsg-1.pgdg110+1

RUN apt-get update \
&& apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \
Expand Down
6 changes: 3 additions & 3 deletions 14-3.3/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ ARG BASE_IMAGE=postgres:14-alpine3.18
FROM ${BASE_IMAGE}

LABEL maintainer="PostGIS Project - https://postgis.net" \
org.opencontainers.image.description="PostGIS 3.3.3 spatial database extension with PostgreSQL 14 Alpine" \
org.opencontainers.image.description="PostGIS 3.3.4 spatial database extension with PostgreSQL 14 Alpine" \
org.opencontainers.image.source="https://github.com/postgis/docker-postgis"

ENV POSTGIS_VERSION 3.3.3
ENV POSTGIS_SHA256 441bb33bd2be362c7c463161207f290a1c25083027a069322696eeec74fc916b
ENV POSTGIS_VERSION 3.3.4
ENV POSTGIS_SHA256 68507aa4ab7f9f7218fcefdcdd989911415e5f670128eb33acbbb362a24a998e

RUN set -eux \
&& apk add --no-cache --virtual .fetch-deps \
Expand Down
18 changes: 9 additions & 9 deletions 14-master/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ ENV DOCKER_CMAKE_BUILD_TYPE=${DOCKER_CMAKE_BUILD_TYPE}
# one can benefit from the latest CGAL patches while avoiding compatibility issues.
ARG CGAL_GIT_BRANCH
ENV CGAL_GIT_BRANCH=${CGAL_GIT_BRANCH}
ENV CGAL5X_GIT_HASH 9cc17545b4a80297fdbba5cc348479edea767cfb
ENV CGAL5X_GIT_HASH dd3b569e7abd66ba181d8d5567b62b1b88f187d1
ENV SFCGAL_GIT_HASH ae0a12da1e7a32d163930789e62874ca6ff0792c
RUN set -ex \
&& mkdir -p /usr/src \
Expand Down Expand Up @@ -122,7 +122,7 @@ RUN set -ex \
&& rm -fr /usr/src/cgal

# proj
ENV PROJ_GIT_HASH effac63ae5360e737790defa5bdc3d070d19a49b
ENV PROJ_GIT_HASH fde3d58e4af51f8e6c9cafeeb2b0299ab1218d91
RUN set -ex \
&& cd /usr/src \
&& git clone https://github.com/OSGeo/PROJ.git \
Expand Down Expand Up @@ -152,7 +152,7 @@ RUN set -ex \
&& rm -fr /usr/src/PROJ

# geos
ENV GEOS_GIT_HASH 17fd3b0ffcb7dac8a79ca35b1938760f444629cd
ENV GEOS_GIT_HASH 3d4870f7970dfac1b090e8a0d05d9b969a9d1180
RUN set -ex \
&& cd /usr/src \
&& git clone https://github.com/libgeos/geos.git \
Expand All @@ -168,7 +168,7 @@ RUN set -ex \
&& rm -fr /usr/src/geos

# gdal
ENV GDAL_GIT_HASH f11a55b71435db4000db1665739cd65f8441cde7
ENV GDAL_GIT_HASH d5ae41aed1960dfd511d3c1edfbcefbe85d1adb2
RUN set -ex \
&& cd /usr/src \
&& git clone https://github.com/OSGeo/gdal.git \
Expand Down Expand Up @@ -301,11 +301,11 @@ COPY --from=builder /usr/local /usr/local

ARG CGAL_GIT_BRANCH
ENV CGAL_GIT_BRANCH=${CGAL_GIT_BRANCH}
ENV CGAL5X_GIT_HASH 9cc17545b4a80297fdbba5cc348479edea767cfb
ENV CGAL5X_GIT_HASH dd3b569e7abd66ba181d8d5567b62b1b88f187d1
ENV SFCGAL_GIT_HASH ae0a12da1e7a32d163930789e62874ca6ff0792c
ENV PROJ_GIT_HASH effac63ae5360e737790defa5bdc3d070d19a49b
ENV GEOS_GIT_HASH 17fd3b0ffcb7dac8a79ca35b1938760f444629cd
ENV GDAL_GIT_HASH f11a55b71435db4000db1665739cd65f8441cde7
ENV PROJ_GIT_HASH fde3d58e4af51f8e6c9cafeeb2b0299ab1218d91
ENV GEOS_GIT_HASH 3d4870f7970dfac1b090e8a0d05d9b969a9d1180
ENV GDAL_GIT_HASH d5ae41aed1960dfd511d3c1edfbcefbe85d1adb2

# Minimal command line test ( fail fast )
RUN set -ex \
Expand All @@ -324,7 +324,7 @@ RUN set -ex \
|| echo "ogr2ogr missing PostgreSQL driver" && exit 1

# install postgis
ENV POSTGIS_GIT_HASH 9b9a99dd0302f3a4e0b8a1c628fd00ba6f0e348d
ENV POSTGIS_GIT_HASH 6c7661430ebcce4521b23bd97b0a0d2be5ea027d

RUN set -ex \
&& apt-get update \
Expand Down
4 changes: 2 additions & 2 deletions 15-3.3/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
FROM postgres:15-bullseye

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

ENV POSTGIS_MAJOR 3
ENV POSTGIS_VERSION 3.3.3+dfsg-1.pgdg110+1
ENV POSTGIS_VERSION 3.3.4+dfsg-1.pgdg110+1

RUN apt-get update \
&& apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \
Expand Down
6 changes: 3 additions & 3 deletions 15-3.3/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ ARG BASE_IMAGE=postgres:15-alpine3.18
FROM ${BASE_IMAGE}

LABEL maintainer="PostGIS Project - https://postgis.net" \
org.opencontainers.image.description="PostGIS 3.3.3 spatial database extension with PostgreSQL 15 Alpine" \
org.opencontainers.image.description="PostGIS 3.3.4 spatial database extension with PostgreSQL 15 Alpine" \
org.opencontainers.image.source="https://github.com/postgis/docker-postgis"

ENV POSTGIS_VERSION 3.3.3
ENV POSTGIS_SHA256 441bb33bd2be362c7c463161207f290a1c25083027a069322696eeec74fc916b
ENV POSTGIS_VERSION 3.3.4
ENV POSTGIS_SHA256 68507aa4ab7f9f7218fcefdcdd989911415e5f670128eb33acbbb362a24a998e

RUN set -eux \
&& apk add --no-cache --virtual .fetch-deps \
Expand Down
File renamed without changes.
123 changes: 123 additions & 0 deletions 15-3.4.0beta2/alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "make update"! PLEASE DO NOT EDIT IT DIRECTLY.
#
ARG BASE_IMAGE=postgres:15-alpine3.18
FROM ${BASE_IMAGE}

LABEL maintainer="PostGIS Project - https://postgis.net" \
org.opencontainers.image.description="PostGIS 3.4.0beta2 spatial database extension with PostgreSQL 15 Alpine" \
org.opencontainers.image.source="https://github.com/postgis/docker-postgis"

ENV POSTGIS_VERSION 3.4.0beta2
ENV POSTGIS_SHA256 9460f546b02e95958ce3c4c763d75aa4dc8d44d559a9d5a108ef0e718671b3aa

RUN set -eux \
&& apk add --no-cache --virtual .fetch-deps \
ca-certificates \
openssl \
tar \
\
&& wget -O postgis.tar.gz "https://github.com/postgis/postgis/archive/${POSTGIS_VERSION}.tar.gz" \
&& echo "${POSTGIS_SHA256} *postgis.tar.gz" | sha256sum -c - \
&& mkdir -p /usr/src/postgis \
&& tar \
--extract \
--file postgis.tar.gz \
--directory /usr/src/postgis \
--strip-components 1 \
&& rm postgis.tar.gz \
\
&& apk add --no-cache --virtual .build-deps \
\
gdal-dev \
geos-dev \
proj-dev \
proj-util \
sfcgal-dev \
\
# The upstream variable, '$DOCKER_PG_LLVM_DEPS' contains
# the correct versions of 'llvm-dev' and 'clang' for the current version of PostgreSQL.
# This improvement has been discussed in https://github.com/docker-library/postgres/pull/1077
$DOCKER_PG_LLVM_DEPS \
\
autoconf \
automake \
cunit-dev \
file \
g++ \
gcc \
gettext-dev \
git \
json-c-dev \
libtool \
libxml2-dev \
make \
pcre2-dev \
perl \
protobuf-c-dev \
\
# build PostGIS - with Link Time Optimization (LTO) enabled
&& cd /usr/src/postgis \
&& gettextize \
&& ./autogen.sh \
&& ./configure \
--enable-lto \
&& make -j$(nproc) \
&& make install \
\
# This section is for refreshing the proj data for the regression tests.
# It serves as a workaround for an issue documented at https://trac.osgeo.org/postgis/ticket/5316
# This increases the Docker image size by about 1 MB.
&& projsync --system-directory --file ch_swisstopo_CHENyx06_ETRS \
&& projsync --system-directory --file us_noaa_eshpgn \
&& projsync --system-directory --file us_noaa_prvi \
&& projsync --system-directory --file us_noaa_wmhpgn \
# This section performs a regression check.
&& mkdir /tempdb \
&& chown -R postgres:postgres /tempdb \
&& su postgres -c 'pg_ctl -D /tempdb init' \
&& su postgres -c 'pg_ctl -D /tempdb start' \
&& cd regress \
&& make -j$(nproc) check RUNTESTFLAGS=--extension PGUSER=postgres \
\
&& su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis;"' \
&& su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_raster;"' \
&& su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_sfcgal;"' \
&& su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; --needed for postgis_tiger_geocoder "' \
&& su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer;"' \
&& su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS address_standardizer_data_us;"' \
&& su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;"' \
&& su postgres -c 'psql -c "CREATE EXTENSION IF NOT EXISTS postgis_topology;"' \
&& su postgres -c 'psql -t -c "SELECT version();"' >> /_pgis_full_version.txt \
&& su postgres -c 'psql -t -c "SELECT PostGIS_Full_Version();"' >> /_pgis_full_version.txt \
&& su postgres -c 'psql -t -c "\dx"' >> /_pgis_full_version.txt \
\
&& su postgres -c 'pg_ctl -D /tempdb --mode=immediate stop' \
&& rm -rf /tempdb \
&& rm -rf /tmp/pgis_reg \
# add .postgis-rundeps
&& apk add --no-cache --virtual .postgis-rundeps \
\
gdal \
geos \
proj \
sfcgal \
\
json-c \
libstdc++ \
pcre2 \
protobuf-c \
\
# ca-certificates: for accessing remote raster files
# fix https://github.com/postgis/docker-postgis/issues/307
ca-certificates \
# clean
&& cd / \
&& rm -rf /usr/src/postgis \
&& apk del .fetch-deps .build-deps \
# At the end of the build, we print the collected information
# from the '/_pgis_full_version.txt' file. This is for experimental and internal purposes.
&& cat /_pgis_full_version.txt

COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh
COPY ./update-postgis.sh /usr/local/bin
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 4e1bf4e

Please sign in to comment.