diff --git a/12-3.5/alpine/Dockerfile b/12-3.5/alpine/Dockerfile index 053a8632..f4ca06b8 100644 --- a/12-3.5/alpine/Dockerfile +++ b/12-3.5/alpine/Dockerfile @@ -1,15 +1,15 @@ # # NOTE: THIS DOCKERFILE IS GENERATED VIA "make update"! PLEASE DO NOT EDIT IT DIRECTLY. # -ARG BASE_IMAGE=postgres:12-alpine3.20 +ARG BASE_IMAGE=postgres:12-alpine3.21 FROM ${BASE_IMAGE} LABEL maintainer="PostGIS Project - https://postgis.net" \ - org.opencontainers.image.description="PostGIS 3.5.0 spatial database extension with PostgreSQL 12 Alpine" \ + org.opencontainers.image.description="PostGIS 3.5.1 spatial database extension with PostgreSQL 12 Alpine" \ org.opencontainers.image.source="https://github.com/postgis/docker-postgis" -ENV POSTGIS_VERSION 3.5.0 -ENV POSTGIS_SHA256 a47b8415ab88437390eba28e51b993cf0a2357057c277eea00378b8b76ab2316 +ENV POSTGIS_VERSION 3.5.1 +ENV POSTGIS_SHA256 b46a63a0563a46a670686a56464c1afb5db0b97ee62e87766edd1d2748492b09 RUN set -eux \ && apk add --no-cache --virtual .fetch-deps \ diff --git a/13-3.5/alpine/Dockerfile b/13-3.5/alpine/Dockerfile index 2470ada0..9880fbb0 100644 --- a/13-3.5/alpine/Dockerfile +++ b/13-3.5/alpine/Dockerfile @@ -1,15 +1,15 @@ # # NOTE: THIS DOCKERFILE IS GENERATED VIA "make update"! PLEASE DO NOT EDIT IT DIRECTLY. # -ARG BASE_IMAGE=postgres:13-alpine3.20 +ARG BASE_IMAGE=postgres:13-alpine3.21 FROM ${BASE_IMAGE} LABEL maintainer="PostGIS Project - https://postgis.net" \ - org.opencontainers.image.description="PostGIS 3.5.0 spatial database extension with PostgreSQL 13 Alpine" \ + org.opencontainers.image.description="PostGIS 3.5.1 spatial database extension with PostgreSQL 13 Alpine" \ org.opencontainers.image.source="https://github.com/postgis/docker-postgis" -ENV POSTGIS_VERSION 3.5.0 -ENV POSTGIS_SHA256 a47b8415ab88437390eba28e51b993cf0a2357057c277eea00378b8b76ab2316 +ENV POSTGIS_VERSION 3.5.1 +ENV POSTGIS_SHA256 b46a63a0563a46a670686a56464c1afb5db0b97ee62e87766edd1d2748492b09 RUN set -eux \ && apk add --no-cache --virtual .fetch-deps \ diff --git a/14-3.5/alpine/Dockerfile b/14-3.5/alpine/Dockerfile index a72967e0..22148218 100644 --- a/14-3.5/alpine/Dockerfile +++ b/14-3.5/alpine/Dockerfile @@ -1,15 +1,15 @@ # # NOTE: THIS DOCKERFILE IS GENERATED VIA "make update"! PLEASE DO NOT EDIT IT DIRECTLY. # -ARG BASE_IMAGE=postgres:14-alpine3.20 +ARG BASE_IMAGE=postgres:14-alpine3.21 FROM ${BASE_IMAGE} LABEL maintainer="PostGIS Project - https://postgis.net" \ - org.opencontainers.image.description="PostGIS 3.5.0 spatial database extension with PostgreSQL 14 Alpine" \ + org.opencontainers.image.description="PostGIS 3.5.1 spatial database extension with PostgreSQL 14 Alpine" \ org.opencontainers.image.source="https://github.com/postgis/docker-postgis" -ENV POSTGIS_VERSION 3.5.0 -ENV POSTGIS_SHA256 a47b8415ab88437390eba28e51b993cf0a2357057c277eea00378b8b76ab2316 +ENV POSTGIS_VERSION 3.5.1 +ENV POSTGIS_SHA256 b46a63a0563a46a670686a56464c1afb5db0b97ee62e87766edd1d2748492b09 RUN set -eux \ && apk add --no-cache --virtual .fetch-deps \ diff --git a/15-3.5/alpine/Dockerfile b/15-3.5/alpine/Dockerfile index b3f15b86..954ecc0c 100644 --- a/15-3.5/alpine/Dockerfile +++ b/15-3.5/alpine/Dockerfile @@ -1,15 +1,15 @@ # # NOTE: THIS DOCKERFILE IS GENERATED VIA "make update"! PLEASE DO NOT EDIT IT DIRECTLY. # -ARG BASE_IMAGE=postgres:15-alpine3.20 +ARG BASE_IMAGE=postgres:15-alpine3.21 FROM ${BASE_IMAGE} LABEL maintainer="PostGIS Project - https://postgis.net" \ - org.opencontainers.image.description="PostGIS 3.5.0 spatial database extension with PostgreSQL 15 Alpine" \ + org.opencontainers.image.description="PostGIS 3.5.1 spatial database extension with PostgreSQL 15 Alpine" \ org.opencontainers.image.source="https://github.com/postgis/docker-postgis" -ENV POSTGIS_VERSION 3.5.0 -ENV POSTGIS_SHA256 a47b8415ab88437390eba28e51b993cf0a2357057c277eea00378b8b76ab2316 +ENV POSTGIS_VERSION 3.5.1 +ENV POSTGIS_SHA256 b46a63a0563a46a670686a56464c1afb5db0b97ee62e87766edd1d2748492b09 RUN set -eux \ && apk add --no-cache --virtual .fetch-deps \ diff --git a/16-3.5/16-3.4/Dockerfile b/16-3.5/16-3.4/Dockerfile deleted file mode 100644 index 5184a329..00000000 --- a/16-3.5/16-3.4/Dockerfile +++ /dev/null @@ -1,28 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "make update"! PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM postgres:16-bullseye - -LABEL maintainer="PostGIS Project - https://postgis.net" \ - org.opencontainers.image.description="PostGIS 3.4.3+dfsg-2.pgdg110+1 spatial database extension with PostgreSQL 16 bullseye" \ - org.opencontainers.image.source="https://github.com/postgis/docker-postgis" - -ENV POSTGIS_MAJOR 3 -ENV POSTGIS_VERSION 3.4.3+dfsg-2.pgdg110+1 - -RUN apt-get update \ - && apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \ - && apt-get install -y --no-install-recommends \ - # ca-certificates: for accessing remote raster files; - # fix: https://github.com/postgis/docker-postgis/issues/307 - ca-certificates \ - \ - postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR=$POSTGIS_VERSION \ - postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR-scripts \ - && rm -rf /var/lib/apt/lists/* - -RUN mkdir -p /docker-entrypoint-initdb.d -COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh -COPY ./update-postgis.sh /usr/local/bin - diff --git a/16-3.5/16-3.4/alpine/Dockerfile b/16-3.5/16-3.4/alpine/Dockerfile deleted file mode 100644 index 620eda77..00000000 --- a/16-3.5/16-3.4/alpine/Dockerfile +++ /dev/null @@ -1,124 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "make update"! PLEASE DO NOT EDIT IT DIRECTLY. -# -ARG BASE_IMAGE=postgres:16-alpine3.20 -FROM ${BASE_IMAGE} - -LABEL maintainer="PostGIS Project - https://postgis.net" \ - org.opencontainers.image.description="PostGIS 3.4.3 spatial database extension with PostgreSQL 16 Alpine" \ - org.opencontainers.image.source="https://github.com/postgis/docker-postgis" - -ENV POSTGIS_VERSION 3.4.3 -ENV POSTGIS_SHA256 802e1626252d12ec1d29261b95bf62930e1859587e44cad28d65b897a8d9ee6b - -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 -c -l /tmp/logfile -o '-F' 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/logfile \ - && 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 diff --git a/16-3.5/16-3.4/alpine/initdb-postgis.sh b/16-3.5/16-3.4/alpine/initdb-postgis.sh deleted file mode 100644 index e38ad7d6..00000000 --- a/16-3.5/16-3.4/alpine/initdb-postgis.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -set -e - -# Perform all actions as $POSTGRES_USER -export PGUSER="$POSTGRES_USER" - -# Create the 'template_postgis' template db -"${psql[@]}" <<- 'EOSQL' -CREATE DATABASE template_postgis IS_TEMPLATE true; -EOSQL - -# Load PostGIS into both template_database and $POSTGRES_DB -for DB in template_postgis "$POSTGRES_DB"; do - echo "Loading PostGIS extensions into $DB" - "${psql[@]}" --dbname="$DB" <<-'EOSQL' - CREATE EXTENSION IF NOT EXISTS postgis; - CREATE EXTENSION IF NOT EXISTS postgis_topology; - -- Reconnect to update pg_setting.resetval - -- See https://github.com/postgis/docker-postgis/issues/288 - \c - CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; - CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder; -EOSQL -done diff --git a/16-3.5/16-3.4/alpine/update-postgis.sh b/16-3.5/16-3.4/alpine/update-postgis.sh deleted file mode 100755 index f98abd26..00000000 --- a/16-3.5/16-3.4/alpine/update-postgis.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh - -set -e - -# Perform all actions as $POSTGRES_USER -export PGUSER="$POSTGRES_USER" - -POSTGIS_VERSION="${POSTGIS_VERSION%%+*}" - -# Load PostGIS into both template_database and $POSTGRES_DB -for DB in template_postgis "$POSTGRES_DB" "${@}"; do - echo "Updating PostGIS extensions '$DB' to $POSTGIS_VERSION" - psql --dbname="$DB" -c " - -- Upgrade PostGIS (includes raster) - CREATE EXTENSION IF NOT EXISTS postgis VERSION '$POSTGIS_VERSION'; - ALTER EXTENSION postgis UPDATE TO '$POSTGIS_VERSION'; - - -- Upgrade Topology - CREATE EXTENSION IF NOT EXISTS postgis_topology VERSION '$POSTGIS_VERSION'; - ALTER EXTENSION postgis_topology UPDATE TO '$POSTGIS_VERSION'; - - -- Install Tiger dependencies in case not already installed - CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; - -- Upgrade US Tiger Geocoder - CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder VERSION '$POSTGIS_VERSION'; - ALTER EXTENSION postgis_tiger_geocoder UPDATE TO '$POSTGIS_VERSION'; - " -done diff --git a/16-3.5/16-3.4/initdb-postgis.sh b/16-3.5/16-3.4/initdb-postgis.sh deleted file mode 100644 index e38ad7d6..00000000 --- a/16-3.5/16-3.4/initdb-postgis.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -set -e - -# Perform all actions as $POSTGRES_USER -export PGUSER="$POSTGRES_USER" - -# Create the 'template_postgis' template db -"${psql[@]}" <<- 'EOSQL' -CREATE DATABASE template_postgis IS_TEMPLATE true; -EOSQL - -# Load PostGIS into both template_database and $POSTGRES_DB -for DB in template_postgis "$POSTGRES_DB"; do - echo "Loading PostGIS extensions into $DB" - "${psql[@]}" --dbname="$DB" <<-'EOSQL' - CREATE EXTENSION IF NOT EXISTS postgis; - CREATE EXTENSION IF NOT EXISTS postgis_topology; - -- Reconnect to update pg_setting.resetval - -- See https://github.com/postgis/docker-postgis/issues/288 - \c - CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; - CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder; -EOSQL -done diff --git a/16-3.5/16-3.4/update-postgis.sh b/16-3.5/16-3.4/update-postgis.sh deleted file mode 100755 index f98abd26..00000000 --- a/16-3.5/16-3.4/update-postgis.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh - -set -e - -# Perform all actions as $POSTGRES_USER -export PGUSER="$POSTGRES_USER" - -POSTGIS_VERSION="${POSTGIS_VERSION%%+*}" - -# Load PostGIS into both template_database and $POSTGRES_DB -for DB in template_postgis "$POSTGRES_DB" "${@}"; do - echo "Updating PostGIS extensions '$DB' to $POSTGIS_VERSION" - psql --dbname="$DB" -c " - -- Upgrade PostGIS (includes raster) - CREATE EXTENSION IF NOT EXISTS postgis VERSION '$POSTGIS_VERSION'; - ALTER EXTENSION postgis UPDATE TO '$POSTGIS_VERSION'; - - -- Upgrade Topology - CREATE EXTENSION IF NOT EXISTS postgis_topology VERSION '$POSTGIS_VERSION'; - ALTER EXTENSION postgis_topology UPDATE TO '$POSTGIS_VERSION'; - - -- Install Tiger dependencies in case not already installed - CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; - -- Upgrade US Tiger Geocoder - CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder VERSION '$POSTGIS_VERSION'; - ALTER EXTENSION postgis_tiger_geocoder UPDATE TO '$POSTGIS_VERSION'; - " -done diff --git a/16-3.5/alpine/Dockerfile b/16-3.5/alpine/Dockerfile index fbbdc2fe..46e54caa 100644 --- a/16-3.5/alpine/Dockerfile +++ b/16-3.5/alpine/Dockerfile @@ -1,15 +1,15 @@ # # NOTE: THIS DOCKERFILE IS GENERATED VIA "make update"! PLEASE DO NOT EDIT IT DIRECTLY. # -ARG BASE_IMAGE=postgres:16-alpine3.20 +ARG BASE_IMAGE=postgres:16-alpine3.21 FROM ${BASE_IMAGE} LABEL maintainer="PostGIS Project - https://postgis.net" \ - org.opencontainers.image.description="PostGIS 3.5.0 spatial database extension with PostgreSQL 16 Alpine" \ + org.opencontainers.image.description="PostGIS 3.5.1 spatial database extension with PostgreSQL 16 Alpine" \ org.opencontainers.image.source="https://github.com/postgis/docker-postgis" -ENV POSTGIS_VERSION 3.5.0 -ENV POSTGIS_SHA256 a47b8415ab88437390eba28e51b993cf0a2357057c277eea00378b8b76ab2316 +ENV POSTGIS_VERSION 3.5.1 +ENV POSTGIS_SHA256 b46a63a0563a46a670686a56464c1afb5db0b97ee62e87766edd1d2748492b09 RUN set -eux \ && apk add --no-cache --virtual .fetch-deps \ diff --git a/16-master/Dockerfile b/16-master/Dockerfile index 38fd4506..ed187124 100644 --- a/16-master/Dockerfile +++ b/16-master/Dockerfile @@ -86,8 +86,8 @@ ENV DOCKER_CMAKE_BUILD_TYPE=${DOCKER_CMAKE_BUILD_TYPE} # cgal & sfcgal ARG CGAL_GIT_BRANCH ENV CGAL_GIT_BRANCH=${CGAL_GIT_BRANCH} -ENV CGAL_GIT_HASH da588c9f95ba1040801afb7e9304259d9359835b -ENV SFCGAL_GIT_HASH 8660a26173895e6d298a024a9f10fd6e27d43d8b +ENV CGAL_GIT_HASH f5f5dc72441cd89d5e54ba7026f0524bb07571f3 +ENV SFCGAL_GIT_HASH 38d5c0f5af3eaf38998e53d959994a346deb1c64 RUN set -ex \ && mkdir -p /usr/src \ && cd /usr/src \ @@ -120,7 +120,7 @@ RUN set -ex \ && rm -fr /usr/src/cgal # proj -ENV PROJ_GIT_HASH 2d430667ce01f845a8fd9768891d45c489c77094 +ENV PROJ_GIT_HASH 3421b04700627e2f83ebc3e2cb413eefe0fdb923 RUN set -ex \ && cd /usr/src \ && git clone https://github.com/OSGeo/PROJ.git \ @@ -150,7 +150,7 @@ RUN set -ex \ && rm -fr /usr/src/PROJ # geos -ENV GEOS_GIT_HASH 930487a20b6b5860eba91f9719ce0881973defc2 +ENV GEOS_GIT_HASH e1c9a7c5c6819383bb57fb15a000cdb06dd47600 RUN set -ex \ && cd /usr/src \ && git clone https://github.com/libgeos/geos.git \ @@ -166,7 +166,7 @@ RUN set -ex \ && rm -fr /usr/src/geos # gdal -ENV GDAL_GIT_HASH f6945319679af19f2487cd76b1f62550fdb862ba +ENV GDAL_GIT_HASH f314d4b6bc0b70582fd1cb07f8ae95d01e9c8a86 RUN set -ex \ && cd /usr/src \ && git clone https://github.com/OSGeo/gdal.git \ @@ -299,11 +299,11 @@ COPY --from=builder /usr/local /usr/local ARG CGAL_GIT_BRANCH ENV CGAL_GIT_BRANCH=${CGAL_GIT_BRANCH} -ENV CGAL_GIT_HASH da588c9f95ba1040801afb7e9304259d9359835b -ENV SFCGAL_GIT_HASH 8660a26173895e6d298a024a9f10fd6e27d43d8b -ENV PROJ_GIT_HASH 2d430667ce01f845a8fd9768891d45c489c77094 -ENV GEOS_GIT_HASH 930487a20b6b5860eba91f9719ce0881973defc2 -ENV GDAL_GIT_HASH f6945319679af19f2487cd76b1f62550fdb862ba +ENV CGAL_GIT_HASH f5f5dc72441cd89d5e54ba7026f0524bb07571f3 +ENV SFCGAL_GIT_HASH 38d5c0f5af3eaf38998e53d959994a346deb1c64 +ENV PROJ_GIT_HASH 3421b04700627e2f83ebc3e2cb413eefe0fdb923 +ENV GEOS_GIT_HASH e1c9a7c5c6819383bb57fb15a000cdb06dd47600 +ENV GDAL_GIT_HASH f314d4b6bc0b70582fd1cb07f8ae95d01e9c8a86 # Minimal command line test ( fail fast ) RUN set -ex \ @@ -322,7 +322,7 @@ RUN set -ex \ || echo "ogr2ogr missing PostgreSQL driver" && exit 1 # install postgis -ENV POSTGIS_GIT_HASH 78f1646214ca915fd34580a63989afd772736521 +ENV POSTGIS_GIT_HASH 04ef40af32ceeb671bce399b73814e8630c54a6d RUN set -ex \ && apt-get update \ diff --git a/17-3.5/17-3.4/Dockerfile b/17-3.5/17-3.4/Dockerfile deleted file mode 100644 index bfa1eff7..00000000 --- a/17-3.5/17-3.4/Dockerfile +++ /dev/null @@ -1,28 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "make update"! PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM postgres:17-bullseye - -LABEL maintainer="PostGIS Project - https://postgis.net" \ - org.opencontainers.image.description="PostGIS 3.4.3+dfsg-2.pgdg110+1 spatial database extension with PostgreSQL 17 bullseye" \ - org.opencontainers.image.source="https://github.com/postgis/docker-postgis" - -ENV POSTGIS_MAJOR 3 -ENV POSTGIS_VERSION 3.4.3+dfsg-2.pgdg110+1 - -RUN apt-get update \ - && apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \ - && apt-get install -y --no-install-recommends \ - # ca-certificates: for accessing remote raster files; - # fix: https://github.com/postgis/docker-postgis/issues/307 - ca-certificates \ - \ - postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR=$POSTGIS_VERSION \ - postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR-scripts \ - && rm -rf /var/lib/apt/lists/* - -RUN mkdir -p /docker-entrypoint-initdb.d -COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh -COPY ./update-postgis.sh /usr/local/bin - diff --git a/17-3.5/17-3.4/alpine/Dockerfile b/17-3.5/17-3.4/alpine/Dockerfile deleted file mode 100644 index d3eb8aeb..00000000 --- a/17-3.5/17-3.4/alpine/Dockerfile +++ /dev/null @@ -1,124 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "make update"! PLEASE DO NOT EDIT IT DIRECTLY. -# -ARG BASE_IMAGE=postgres:17-alpine3.20 -FROM ${BASE_IMAGE} - -LABEL maintainer="PostGIS Project - https://postgis.net" \ - org.opencontainers.image.description="PostGIS 3.4.3 spatial database extension with PostgreSQL 17 Alpine" \ - org.opencontainers.image.source="https://github.com/postgis/docker-postgis" - -ENV POSTGIS_VERSION 3.4.3 -ENV POSTGIS_SHA256 802e1626252d12ec1d29261b95bf62930e1859587e44cad28d65b897a8d9ee6b - -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 -c -l /tmp/logfile -o '-F' 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/logfile \ - && 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 diff --git a/17-3.5/17-3.4/alpine/initdb-postgis.sh b/17-3.5/17-3.4/alpine/initdb-postgis.sh deleted file mode 100644 index e38ad7d6..00000000 --- a/17-3.5/17-3.4/alpine/initdb-postgis.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -set -e - -# Perform all actions as $POSTGRES_USER -export PGUSER="$POSTGRES_USER" - -# Create the 'template_postgis' template db -"${psql[@]}" <<- 'EOSQL' -CREATE DATABASE template_postgis IS_TEMPLATE true; -EOSQL - -# Load PostGIS into both template_database and $POSTGRES_DB -for DB in template_postgis "$POSTGRES_DB"; do - echo "Loading PostGIS extensions into $DB" - "${psql[@]}" --dbname="$DB" <<-'EOSQL' - CREATE EXTENSION IF NOT EXISTS postgis; - CREATE EXTENSION IF NOT EXISTS postgis_topology; - -- Reconnect to update pg_setting.resetval - -- See https://github.com/postgis/docker-postgis/issues/288 - \c - CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; - CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder; -EOSQL -done diff --git a/17-3.5/17-3.4/alpine/update-postgis.sh b/17-3.5/17-3.4/alpine/update-postgis.sh deleted file mode 100755 index f98abd26..00000000 --- a/17-3.5/17-3.4/alpine/update-postgis.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh - -set -e - -# Perform all actions as $POSTGRES_USER -export PGUSER="$POSTGRES_USER" - -POSTGIS_VERSION="${POSTGIS_VERSION%%+*}" - -# Load PostGIS into both template_database and $POSTGRES_DB -for DB in template_postgis "$POSTGRES_DB" "${@}"; do - echo "Updating PostGIS extensions '$DB' to $POSTGIS_VERSION" - psql --dbname="$DB" -c " - -- Upgrade PostGIS (includes raster) - CREATE EXTENSION IF NOT EXISTS postgis VERSION '$POSTGIS_VERSION'; - ALTER EXTENSION postgis UPDATE TO '$POSTGIS_VERSION'; - - -- Upgrade Topology - CREATE EXTENSION IF NOT EXISTS postgis_topology VERSION '$POSTGIS_VERSION'; - ALTER EXTENSION postgis_topology UPDATE TO '$POSTGIS_VERSION'; - - -- Install Tiger dependencies in case not already installed - CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; - -- Upgrade US Tiger Geocoder - CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder VERSION '$POSTGIS_VERSION'; - ALTER EXTENSION postgis_tiger_geocoder UPDATE TO '$POSTGIS_VERSION'; - " -done diff --git a/17-3.5/17-3.4/initdb-postgis.sh b/17-3.5/17-3.4/initdb-postgis.sh deleted file mode 100644 index e38ad7d6..00000000 --- a/17-3.5/17-3.4/initdb-postgis.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -set -e - -# Perform all actions as $POSTGRES_USER -export PGUSER="$POSTGRES_USER" - -# Create the 'template_postgis' template db -"${psql[@]}" <<- 'EOSQL' -CREATE DATABASE template_postgis IS_TEMPLATE true; -EOSQL - -# Load PostGIS into both template_database and $POSTGRES_DB -for DB in template_postgis "$POSTGRES_DB"; do - echo "Loading PostGIS extensions into $DB" - "${psql[@]}" --dbname="$DB" <<-'EOSQL' - CREATE EXTENSION IF NOT EXISTS postgis; - CREATE EXTENSION IF NOT EXISTS postgis_topology; - -- Reconnect to update pg_setting.resetval - -- See https://github.com/postgis/docker-postgis/issues/288 - \c - CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; - CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder; -EOSQL -done diff --git a/17-3.5/17-3.4/update-postgis.sh b/17-3.5/17-3.4/update-postgis.sh deleted file mode 100755 index f98abd26..00000000 --- a/17-3.5/17-3.4/update-postgis.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh - -set -e - -# Perform all actions as $POSTGRES_USER -export PGUSER="$POSTGRES_USER" - -POSTGIS_VERSION="${POSTGIS_VERSION%%+*}" - -# Load PostGIS into both template_database and $POSTGRES_DB -for DB in template_postgis "$POSTGRES_DB" "${@}"; do - echo "Updating PostGIS extensions '$DB' to $POSTGIS_VERSION" - psql --dbname="$DB" -c " - -- Upgrade PostGIS (includes raster) - CREATE EXTENSION IF NOT EXISTS postgis VERSION '$POSTGIS_VERSION'; - ALTER EXTENSION postgis UPDATE TO '$POSTGIS_VERSION'; - - -- Upgrade Topology - CREATE EXTENSION IF NOT EXISTS postgis_topology VERSION '$POSTGIS_VERSION'; - ALTER EXTENSION postgis_topology UPDATE TO '$POSTGIS_VERSION'; - - -- Install Tiger dependencies in case not already installed - CREATE EXTENSION IF NOT EXISTS fuzzystrmatch; - -- Upgrade US Tiger Geocoder - CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder VERSION '$POSTGIS_VERSION'; - ALTER EXTENSION postgis_tiger_geocoder UPDATE TO '$POSTGIS_VERSION'; - " -done diff --git a/17-3.5/alpine/Dockerfile b/17-3.5/alpine/Dockerfile index 75baccb6..a6bd090a 100644 --- a/17-3.5/alpine/Dockerfile +++ b/17-3.5/alpine/Dockerfile @@ -1,15 +1,15 @@ # # NOTE: THIS DOCKERFILE IS GENERATED VIA "make update"! PLEASE DO NOT EDIT IT DIRECTLY. # -ARG BASE_IMAGE=postgres:17-alpine3.20 +ARG BASE_IMAGE=postgres:17-alpine3.21 FROM ${BASE_IMAGE} LABEL maintainer="PostGIS Project - https://postgis.net" \ - org.opencontainers.image.description="PostGIS 3.5.0 spatial database extension with PostgreSQL 17 Alpine" \ + org.opencontainers.image.description="PostGIS 3.5.1 spatial database extension with PostgreSQL 17 Alpine" \ org.opencontainers.image.source="https://github.com/postgis/docker-postgis" -ENV POSTGIS_VERSION 3.5.0 -ENV POSTGIS_SHA256 a47b8415ab88437390eba28e51b993cf0a2357057c277eea00378b8b76ab2316 +ENV POSTGIS_VERSION 3.5.1 +ENV POSTGIS_SHA256 b46a63a0563a46a670686a56464c1afb5db0b97ee62e87766edd1d2748492b09 RUN set -eux \ && apk add --no-cache --virtual .fetch-deps \ diff --git a/17-master/Dockerfile b/17-master/Dockerfile index a46fb0a9..d8bce3be 100644 --- a/17-master/Dockerfile +++ b/17-master/Dockerfile @@ -86,8 +86,8 @@ ENV DOCKER_CMAKE_BUILD_TYPE=${DOCKER_CMAKE_BUILD_TYPE} # cgal & sfcgal ARG CGAL_GIT_BRANCH ENV CGAL_GIT_BRANCH=${CGAL_GIT_BRANCH} -ENV CGAL_GIT_HASH da588c9f95ba1040801afb7e9304259d9359835b -ENV SFCGAL_GIT_HASH 8660a26173895e6d298a024a9f10fd6e27d43d8b +ENV CGAL_GIT_HASH f5f5dc72441cd89d5e54ba7026f0524bb07571f3 +ENV SFCGAL_GIT_HASH 38d5c0f5af3eaf38998e53d959994a346deb1c64 RUN set -ex \ && mkdir -p /usr/src \ && cd /usr/src \ @@ -120,7 +120,7 @@ RUN set -ex \ && rm -fr /usr/src/cgal # proj -ENV PROJ_GIT_HASH 2d430667ce01f845a8fd9768891d45c489c77094 +ENV PROJ_GIT_HASH 3421b04700627e2f83ebc3e2cb413eefe0fdb923 RUN set -ex \ && cd /usr/src \ && git clone https://github.com/OSGeo/PROJ.git \ @@ -150,7 +150,7 @@ RUN set -ex \ && rm -fr /usr/src/PROJ # geos -ENV GEOS_GIT_HASH 930487a20b6b5860eba91f9719ce0881973defc2 +ENV GEOS_GIT_HASH e1c9a7c5c6819383bb57fb15a000cdb06dd47600 RUN set -ex \ && cd /usr/src \ && git clone https://github.com/libgeos/geos.git \ @@ -166,7 +166,7 @@ RUN set -ex \ && rm -fr /usr/src/geos # gdal -ENV GDAL_GIT_HASH f6945319679af19f2487cd76b1f62550fdb862ba +ENV GDAL_GIT_HASH f314d4b6bc0b70582fd1cb07f8ae95d01e9c8a86 RUN set -ex \ && cd /usr/src \ && git clone https://github.com/OSGeo/gdal.git \ @@ -299,11 +299,11 @@ COPY --from=builder /usr/local /usr/local ARG CGAL_GIT_BRANCH ENV CGAL_GIT_BRANCH=${CGAL_GIT_BRANCH} -ENV CGAL_GIT_HASH da588c9f95ba1040801afb7e9304259d9359835b -ENV SFCGAL_GIT_HASH 8660a26173895e6d298a024a9f10fd6e27d43d8b -ENV PROJ_GIT_HASH 2d430667ce01f845a8fd9768891d45c489c77094 -ENV GEOS_GIT_HASH 930487a20b6b5860eba91f9719ce0881973defc2 -ENV GDAL_GIT_HASH f6945319679af19f2487cd76b1f62550fdb862ba +ENV CGAL_GIT_HASH f5f5dc72441cd89d5e54ba7026f0524bb07571f3 +ENV SFCGAL_GIT_HASH 38d5c0f5af3eaf38998e53d959994a346deb1c64 +ENV PROJ_GIT_HASH 3421b04700627e2f83ebc3e2cb413eefe0fdb923 +ENV GEOS_GIT_HASH e1c9a7c5c6819383bb57fb15a000cdb06dd47600 +ENV GDAL_GIT_HASH f314d4b6bc0b70582fd1cb07f8ae95d01e9c8a86 # Minimal command line test ( fail fast ) RUN set -ex \ @@ -322,7 +322,7 @@ RUN set -ex \ || echo "ogr2ogr missing PostgreSQL driver" && exit 1 # install postgis -ENV POSTGIS_GIT_HASH 78f1646214ca915fd34580a63989afd772736521 +ENV POSTGIS_GIT_HASH 04ef40af32ceeb671bce399b73814e8630c54a6d RUN set -ex \ && apt-get update \ diff --git a/Dockerfile.alpine.template b/Dockerfile.alpine.template index a2c92db3..e23d1e11 100644 --- a/Dockerfile.alpine.template +++ b/Dockerfile.alpine.template @@ -1,7 +1,7 @@ # # %%TXT_AUTOGENERATED%% # -ARG BASE_IMAGE=postgres:%%PG_MAJOR%%-alpine3.20 +ARG BASE_IMAGE=postgres:%%PG_MAJOR%%-alpine3.21 FROM ${BASE_IMAGE} LABEL maintainer="PostGIS Project - https://postgis.net" \ diff --git a/README.md b/README.md index 55e8dd6a..4b16de46 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ This image ensures that the default database created by the parent `postgres` im Unless `-e POSTGRES_DB` is passed to the container at startup time, this database will be named after the admin user (either `postgres` or the user specified with `-e POSTGRES_USER`). If you would prefer to use the older template database mechanism for enabling PostGIS, the image also provides a PostGIS-enabled template database called `template_postgis`. -# Versions (2024-11-24) +# Versions (2024-12-24) Supported architecture: `amd64` (also known as X86-64)" @@ -44,17 +44,17 @@ Recommended versions for new users are: `postgis/postgis:17-3.5`, `postgis/postg ### Alpine based * The base operating system is [Alpine Linux](https://alpinelinux.org/). It is designed to be small, simple, and secure, and it's based on [musl libc](https://musl.libc.org/). -* In the Alpine 3.20 version, the package versions are: geos=3.12.2, gdal=3.9.2, proj=9.4, and sfcgal=1.5.1 +* In the Alpine 3.21 version, the package versions are: geos=3.13, gdal=3.10, proj=9.5, and sfcgal=2.0 * PostGIS is compiled from source, making it a bit more challenging to extend. | DockerHub image | Dockerfile | OS | Postgres | PostGIS | | --------------- | ---------- | -- | -------- | ------- | -| [postgis/postgis:12-3.5-alpine](https://registry.hub.docker.com/r/postgis/postgis/tags?page=1&name=12-3.5-alpine) | [Dockerfile](https://github.com/postgis/docker-postgis/blob/master/12-3.5/alpine/Dockerfile) | alpine:3.20 | 12 | 3.5.0 | -| [postgis/postgis:13-3.5-alpine](https://registry.hub.docker.com/r/postgis/postgis/tags?page=1&name=13-3.5-alpine) | [Dockerfile](https://github.com/postgis/docker-postgis/blob/master/13-3.5/alpine/Dockerfile) | alpine:3.20 | 13 | 3.5.0 | -| [postgis/postgis:14-3.5-alpine](https://registry.hub.docker.com/r/postgis/postgis/tags?page=1&name=14-3.5-alpine) | [Dockerfile](https://github.com/postgis/docker-postgis/blob/master/14-3.5/alpine/Dockerfile) | alpine:3.20 | 14 | 3.5.0 | -| [postgis/postgis:15-3.5-alpine](https://registry.hub.docker.com/r/postgis/postgis/tags?page=1&name=15-3.5-alpine) | [Dockerfile](https://github.com/postgis/docker-postgis/blob/master/15-3.5/alpine/Dockerfile) | alpine:3.20 | 15 | 3.5.0 | -| [postgis/postgis:16-3.5-alpine](https://registry.hub.docker.com/r/postgis/postgis/tags?page=1&name=16-3.5-alpine) | [Dockerfile](https://github.com/postgis/docker-postgis/blob/master/16-3.5/alpine/Dockerfile) | alpine:3.20 | 16 | 3.5.0 | -| [postgis/postgis:17-3.5-alpine](https://registry.hub.docker.com/r/postgis/postgis/tags?page=1&name=17-3.5-alpine) | [Dockerfile](https://github.com/postgis/docker-postgis/blob/master/17-3.5/alpine/Dockerfile) | alpine:3.20 | 17 | 3.5.0 | +| [postgis/postgis:12-3.5-alpine](https://registry.hub.docker.com/r/postgis/postgis/tags?page=1&name=12-3.5-alpine) | [Dockerfile](https://github.com/postgis/docker-postgis/blob/master/12-3.5/alpine/Dockerfile) | alpine:3.21 | 12 | 3.5.1 | +| [postgis/postgis:13-3.5-alpine](https://registry.hub.docker.com/r/postgis/postgis/tags?page=1&name=13-3.5-alpine) | [Dockerfile](https://github.com/postgis/docker-postgis/blob/master/13-3.5/alpine/Dockerfile) | alpine:3.21 | 13 | 3.5.1 | +| [postgis/postgis:14-3.5-alpine](https://registry.hub.docker.com/r/postgis/postgis/tags?page=1&name=14-3.5-alpine) | [Dockerfile](https://github.com/postgis/docker-postgis/blob/master/14-3.5/alpine/Dockerfile) | alpine:3.21 | 14 | 3.5.1 | +| [postgis/postgis:15-3.5-alpine](https://registry.hub.docker.com/r/postgis/postgis/tags?page=1&name=15-3.5-alpine) | [Dockerfile](https://github.com/postgis/docker-postgis/blob/master/15-3.5/alpine/Dockerfile) | alpine:3.21 | 15 | 3.5.1 | +| [postgis/postgis:16-3.5-alpine](https://registry.hub.docker.com/r/postgis/postgis/tags?page=1&name=16-3.5-alpine) | [Dockerfile](https://github.com/postgis/docker-postgis/blob/master/16-3.5/alpine/Dockerfile) | alpine:3.21 | 16 | 3.5.1 | +| [postgis/postgis:17-3.5-alpine](https://registry.hub.docker.com/r/postgis/postgis/tags?page=1&name=17-3.5-alpine) | [Dockerfile](https://github.com/postgis/docker-postgis/blob/master/17-3.5/alpine/Dockerfile) | alpine:3.21 | 17 | 3.5.1 | ### Test images diff --git a/update.sh b/update.sh index fb85be5e..acc98555 100755 --- a/update.sh +++ b/update.sh @@ -25,7 +25,7 @@ githubrepolink="https://github.com/postgis/docker-postgis/blob/master" # sort version numbers with highest last (so it goes first in .travis.yml) IFS=$'\n'; versions=( $(echo "${versions[*]}" | sort -V) ); unset IFS -defaultAlpinenSuite='3.20' +defaultAlpinenSuite='3.21' defaultDebianSuite='bullseye-slim' declare -A debianSuite=( # https://github.com/docker-library/postgres/issues/582 @@ -243,10 +243,28 @@ for version in "${versions[@]}"; do if [ "master" == "$postgisVersion" ]; then srcVersion="" srcSha256="" + elif [ -d "$version/alpine" ]; then + # For Alpine, get the latest release in the same minor version series + _postgisMajor=$(echo "$postgisMajMin" | cut -d. -f1) + _postgisMinor=$(echo "$postgisMajMin" | cut -d. -f2) + + # Find the latest non-preview release for this minor version + srcVersion=$(echo "$postgis_all_v3_versions_array_string" | tr ' ' '\n' | grep "^${_postgisMajor}\.${_postgisMinor}\." | grep -v '[a-zA-Z]' | head -n 1) + + # If no stable release found, fall back to the debian version + if [ -z "$srcVersion" ]; then + srcVersion="${postgisFullVersion%%+*}" + fi + + srcSha256="$(curl -sSL "https://github.com/postgis/postgis/archive/$srcVersion.tar.gz" | sha256sum | awk '{ print $1 }')" + echo "Selected PostGIS version for Alpine: ${srcVersion}" + postgisDocSrc=$srcVersion else srcVersion="${postgisFullVersion%%+*}" srcSha256="$(curl -sSL "https://github.com/postgis/postgis/archive/$srcVersion.tar.gz" | sha256sum | awk '{ print $1 }')" + postgisDocSrc=$srcVersion fi + for variant in alpine; do if [ ! -d "$version/$variant" ]; then continue