Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 1 addition & 18 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
matrix:
runner-platform: ['ubuntu-24.04', 'ubuntu-24.04-arm']
postgres: [14, 15, 16, 17, 18, 19rc1]
postgis: ['3.6']
postgis: ['3.7']
variant: [default, alpine]
include:
- postgres: 16
Expand Down Expand Up @@ -52,23 +52,6 @@ jobs:
postgis: master
variant: default
runner-platform: 'ubuntu-24.04-arm'
- postgres: 19rc1
postgis: '3.7.0rc3'
variant: alpine
runner-platform: 'ubuntu-24.04'
- postgres: 19rc1
postgis: '3.7.0rc3'
variant: alpine
runner-platform: 'ubuntu-24.04-arm'

- postgres: 18
postgis: '3.7.0rc3'
variant: alpine
runner-platform: 'ubuntu-24.04'
- postgres: 18
postgis: '3.7.0rc3'
variant: alpine
runner-platform: 'ubuntu-24.04-arm'

name: ${{ matrix.postgres }}-${{ matrix.postgis }}-${{ matrix.variant }} ${{ matrix.runner-platform }} - Build Docker image
runs-on: ${{ matrix.runner-platform }}
Expand Down
28 changes: 0 additions & 28 deletions 14-3.6/alpine/update-postgis.sh

This file was deleted.

28 changes: 0 additions & 28 deletions 14-3.6/update-postgis.sh

This file was deleted.

4 changes: 2 additions & 2 deletions 14-3.6/Dockerfile → 14-3.7/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
FROM docker.io/postgres:14-trixie

LABEL maintainer="PostGIS Project - https://postgis.net" \
org.opencontainers.image.description="PostGIS 3.6.4+dfsg-2.pgdg13+1 spatial database extension with PostgreSQL 14 trixie" \
org.opencontainers.image.description="PostGIS 3.7.0+dfsg-1.pgdg13+1 spatial database extension with PostgreSQL 14 trixie" \
org.opencontainers.image.source="https://github.com/postgis/docker-postgis"

ENV POSTGIS_MAJOR=3
ENV POSTGIS_VERSION=3.6.4+dfsg-2.pgdg13+1
ENV POSTGIS_VERSION=3.7.0+dfsg-1.pgdg13+1

RUN apt-get update \
&& apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \
Expand Down
8 changes: 4 additions & 4 deletions 14-3.6/alpine/Dockerfile → 14-3.7/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ FROM ${BASE_IMAGE}
ARG NPROC=

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

ENV POSTGIS_VERSION=3.6.4
ENV POSTGIS_SHA256=4f80e1a4d227f088ae818f79180debd5894c075615823e0f556f73479cf1f200
ENV POSTGIS_VERSION=3.7.0
ENV POSTGIS_SHA256=306d68a115b88c59d9ffbd134b28fd1b0eccb7b0dabcbb5df2dc0b009d9de848

RUN set -eux \
&& apk add --no-cache --virtual .fetch-deps \
Expand Down Expand Up @@ -89,7 +89,7 @@ RUN set -eux \
&& 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 postgis_topology;"' \
# Optional extensions: create them only if they are available.
# Since PostGIS 3.7.0rc, some builds may not include them.
# Since PostGIS 3.7, some builds may not include them.
# PostGIS 3.6.x still includes them.
# See: https://lists.osgeo.org/pipermail/postgis-devel/2026-February/030730.html
&& su postgres -c "psql -v ON_ERROR_STOP=1 -c \" \
Expand Down
File renamed without changes.
54 changes: 54 additions & 0 deletions 14-3.7/alpine/update-postgis.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#!/bin/sh

set -e

# Perform all actions as $POSTGRES_USER
export PGUSER="$POSTGRES_USER"

POSTGIS_VERSION="${POSTGIS_VERSION%%+*}"

# The *-master images do not set POSTGIS_VERSION, use the version they provide
if [ -z "$POSTGIS_VERSION" ]; then
POSTGIS_VERSION="$(psql --dbname=template1 -Atc "SELECT default_version FROM pg_available_extensions WHERE name = 'postgis'")"
fi

# 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';

DO \$\$
DECLARE
orphan text;
BEGIN
-- PostGIS 3.7 and later no longer provide the US Tiger Geocoder
IF EXISTS (
SELECT FROM pg_available_extension_versions
WHERE name = 'postgis_tiger_geocoder' AND version = '$POSTGIS_VERSION'
) THEN
-- 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';
END IF;

-- Installed earlier, but this image can no longer upgrade them
FOR orphan IN
SELECT e.extname FROM pg_extension e
WHERE e.extname IN ('postgis_tiger_geocoder', 'address_standardizer', 'address_standardizer_data_us')
AND NOT EXISTS (SELECT FROM pg_available_extensions a WHERE a.name = e.extname)
LOOP
RAISE WARNING 'extension \"%\" is installed in database \"%\", but this image does not provide it: not upgraded', orphan, current_database();
END LOOP;
END
\$\$;
"
done
File renamed without changes.
54 changes: 54 additions & 0 deletions 14-3.7/update-postgis.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#!/bin/sh

set -e

# Perform all actions as $POSTGRES_USER
export PGUSER="$POSTGRES_USER"

POSTGIS_VERSION="${POSTGIS_VERSION%%+*}"

# The *-master images do not set POSTGIS_VERSION, use the version they provide
if [ -z "$POSTGIS_VERSION" ]; then
POSTGIS_VERSION="$(psql --dbname=template1 -Atc "SELECT default_version FROM pg_available_extensions WHERE name = 'postgis'")"
fi

# 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';

DO \$\$
DECLARE
orphan text;
BEGIN
-- PostGIS 3.7 and later no longer provide the US Tiger Geocoder
IF EXISTS (
SELECT FROM pg_available_extension_versions
WHERE name = 'postgis_tiger_geocoder' AND version = '$POSTGIS_VERSION'
) THEN
-- 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';
END IF;

-- Installed earlier, but this image can no longer upgrade them
FOR orphan IN
SELECT e.extname FROM pg_extension e
WHERE e.extname IN ('postgis_tiger_geocoder', 'address_standardizer', 'address_standardizer_data_us')
AND NOT EXISTS (SELECT FROM pg_available_extensions a WHERE a.name = e.extname)
LOOP
RAISE WARNING 'extension \"%\" is installed in database \"%\", but this image does not provide it: not upgraded', orphan, current_database();
END LOOP;
END
\$\$;
"
done
28 changes: 0 additions & 28 deletions 15-3.6/alpine/update-postgis.sh

This file was deleted.

28 changes: 0 additions & 28 deletions 15-3.6/update-postgis.sh

This file was deleted.

4 changes: 2 additions & 2 deletions 15-3.6/Dockerfile → 15-3.7/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
FROM docker.io/postgres:15-trixie

LABEL maintainer="PostGIS Project - https://postgis.net" \
org.opencontainers.image.description="PostGIS 3.6.4+dfsg-2.pgdg13+1 spatial database extension with PostgreSQL 15 trixie" \
org.opencontainers.image.description="PostGIS 3.7.0+dfsg-1.pgdg13+1 spatial database extension with PostgreSQL 15 trixie" \
org.opencontainers.image.source="https://github.com/postgis/docker-postgis"

ENV POSTGIS_MAJOR=3
ENV POSTGIS_VERSION=3.6.4+dfsg-2.pgdg13+1
ENV POSTGIS_VERSION=3.7.0+dfsg-1.pgdg13+1

RUN apt-get update \
&& apt-cache showpkg postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \
Expand Down
8 changes: 4 additions & 4 deletions 15-3.6/alpine/Dockerfile → 15-3.7/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ FROM ${BASE_IMAGE}
ARG NPROC=

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

ENV POSTGIS_VERSION=3.6.4
ENV POSTGIS_SHA256=4f80e1a4d227f088ae818f79180debd5894c075615823e0f556f73479cf1f200
ENV POSTGIS_VERSION=3.7.0
ENV POSTGIS_SHA256=306d68a115b88c59d9ffbd134b28fd1b0eccb7b0dabcbb5df2dc0b009d9de848

RUN set -eux \
&& apk add --no-cache --virtual .fetch-deps \
Expand Down Expand Up @@ -89,7 +89,7 @@ RUN set -eux \
&& 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 postgis_topology;"' \
# Optional extensions: create them only if they are available.
# Since PostGIS 3.7.0rc, some builds may not include them.
# Since PostGIS 3.7, some builds may not include them.
# PostGIS 3.6.x still includes them.
# See: https://lists.osgeo.org/pipermail/postgis-devel/2026-February/030730.html
&& su postgres -c "psql -v ON_ERROR_STOP=1 -c \" \
Expand Down
File renamed without changes.
54 changes: 54 additions & 0 deletions 15-3.7/alpine/update-postgis.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#!/bin/sh

set -e

# Perform all actions as $POSTGRES_USER
export PGUSER="$POSTGRES_USER"

POSTGIS_VERSION="${POSTGIS_VERSION%%+*}"

# The *-master images do not set POSTGIS_VERSION, use the version they provide
if [ -z "$POSTGIS_VERSION" ]; then
POSTGIS_VERSION="$(psql --dbname=template1 -Atc "SELECT default_version FROM pg_available_extensions WHERE name = 'postgis'")"
fi

# 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';

DO \$\$
DECLARE
orphan text;
BEGIN
-- PostGIS 3.7 and later no longer provide the US Tiger Geocoder
IF EXISTS (
SELECT FROM pg_available_extension_versions
WHERE name = 'postgis_tiger_geocoder' AND version = '$POSTGIS_VERSION'
) THEN
-- 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';
END IF;

-- Installed earlier, but this image can no longer upgrade them
FOR orphan IN
SELECT e.extname FROM pg_extension e
WHERE e.extname IN ('postgis_tiger_geocoder', 'address_standardizer', 'address_standardizer_data_us')
AND NOT EXISTS (SELECT FROM pg_available_extensions a WHERE a.name = e.extname)
LOOP
RAISE WARNING 'extension \"%\" is installed in database \"%\", but this image does not provide it: not upgraded', orphan, current_database();
END LOOP;
END
\$\$;
"
done
File renamed without changes.
Loading