Skip to content

feat: Build and publish multi-platform PostGIS images - #458

Open
reneleonhardt wants to merge 6 commits into
postgis:masterfrom
reneleonhardt:feat/multi-platform
Open

reneleonhardt wants to merge 6 commits into
postgis:masterfrom
reneleonhardt:feat/multi-platform

Conversation

@reneleonhardt

@reneleonhardt reneleonhardt commented Aug 25, 2026 •

Copy link
Copy Markdown

Add native AMD64 and ARM64 builds and smoke tests with Docker Bake. Reuse BuildKit and development-library caches. Publish with OpenID Connect (OIDC) authentication, provenance, and software bills of materials (SBOMs). Check image metadata before publication and the published platforms afterward. Keep latest on 18-3.7.

Build PostGIS 3.7 images for PostgreSQL 14-18 and 19 RC2 on Debian and Alpine. Add 19rc2-master-alpine. Use matching PostgreSQL Global Development Group (PGDG) packages where available, including Tiger. Pin the matching scripts package. Build Address Standardizer from a security-fixed commit because the available PGDG package is affected by CVE-2026-73514 and CVE-2026-90775. Build from source when packages are unavailable, for PostgreSQL prereleases, and on Alpine. Pin Debian development headers to the base image's PostgreSQL package version.

Debian development images use stable CGAL, SFCGAL, PROJ, GEOS, GDAL, and companion extensions, with a security-fixed Address Standardizer commit. PostGIS follows its development branch. The upgrade script handles separate extension versions and warns when an installed extension is unavailable.

PostGIS 3.5 and 3.6 remain retired, in line with upstream. I can restore their working image support if maintainers want it, for example only for stable releases.

Check daily for changes to generated image inputs and PostgreSQL base images. Build and test changed images, then wait at least three days before publishing routine updates. For a security fix, maintainers can choose release in a manual run and select an image. The release skips the routine wait and requires approval after native tests.

Before enabling releases, configure the postgis-routine GitHub environment with a wait timer of at least 4,320 minutes (three days cooldown) and the postgis-security environment with required reviewers. Disable administrator bypass for both environments. The workflow checks these protections before and after the wait. It stops if protection cannot be verified or if the image tag was updated while a scheduled or manual release was waiting. Pull requests and manual test runs build without publishing. Pushes to master build development images.

Follow upstream by keeping master and alpha/beta/RC failures non-blocking. Stable failures remain blocking. Use the PostgreSQL tag and PostGIS version to identify experimental builds. Publish only after AMD64 and ARM64 images pass native smoke tests. Combine the tested image digests and retain their provenance and SBOMs.

Run extension smoke and upgrade checks, including Tiger where available. Run the PostGIS core and SFCGAL regression suites in Debian development builds. Add make image <postgres> <postgis> [default|debian|alpine] [multi]. The multi option exports both architectures to an Open Container Initiative (OCI) archive.

@reneleonhardt
reneleonhardt force-pushed the feat/multi-platform branch 2 times, most recently from 681f7e2 to 0790ee0 Compare September 27, 2026 08:07
@reneleonhardt reneleonhardt mentioned this pull request Sep 27, 2026
@reneleonhardt
reneleonhardt force-pushed the feat/multi-platform branch 4 times, most recently from a710909 to 9b81657 Compare October 22, 2026 07:35
hiddewie added a commit to hiddewie/OpenRailwayMap-vector that referenced this pull request Nov 8, 2026
See postgis/docker-postgis#216, not available
natively yet.

Local testing shows very nice performance improvements using Postgres
19.

See release notes in https://www.postgresql.org/docs/19/release-19.html.

Uses postgis/docker-postgis#458 and specifically
commit
reneleonhardt/docker-postgis@9b81657
to build an image.

Package
https://github.com/hiddewie/OpenRailwayMap-vector/pkgs/container/postgis/1521833380?tag=19rc1-3.7-alpine
is published as `ghcr.io/hiddewie/postgis:19rc1-3.7-alpine`, for
architectures AMD64 and ARM64:
<img width="799" height="498" alt="image"
src="https://github.com/user-attachments/assets/e18867cd-d5d4-4a39-8bf2-2836a73eaacd"
/>
Keep PostGIS 3.7 images for PostgreSQL 14-18 and add 19 RC2.
Use matching PGDG packages where available, including separate
Address Standardizer and Tiger packages. Build from source when
packages are missing or PostgreSQL is a prerelease.

Restore Tiger initialization and companion extension upgrades.
Use shared scripts in the image build contexts and pin PostgreSQL
development headers to the base image version.

Refresh stable dependency releases, update the image tables, and
add extension smoke and updater checks.
Add a command to build one PostgreSQL and PostGIS image. Accept a
trailing multi argument to export AMD64 and ARM64 images to a local
OCI archive. Keep single-platform builds available for Debian and
Alpine, and check both command forms with dry runs.
Build and test AMD64 and ARM64 images on matching runners. Export
each image as an OCI archive with provenance and an SBOM. Publish
only after both tests pass, and combine the tested image digests.

On Mondays, rebuild tags when their build inputs change or their
PostgreSQL base is newer. If the updater or registry lookup fails,
rebuild all eligible tags. Skip changes limited to documentation,
blank lines, and comments.

Keep master and prerelease failures non-blocking, as upstream does.
Check the published image and attestation digests against the tested
images. Use OpenID Connect to log in to Docker Hub.
Let a manual run test all images or select one image. An explicit
release run refreshes image inputs and stops if the updater fails.

Publish only from upstream master after both native builds and tests
pass. Keep manual test runs and runs on other branches read-only.
Build the extension from the upstream commit that fixes
CVE-2026-73514 and CVE-2026-90775. The available PGDG package uses
the affected 3.7.0 source and has no backported patches. Keep the
other PostGIS packages where available.

Provide an upgrade path from extension version 3.7, preserve custom
address data, and run the upstream rule API security tests. Return
to a newer stable source release when one is available.
Check changed image inputs each day and keep tested routine images for
three days before publication. Allow maintainers to approve manual
releases without the routine wait.

Check release protection before and after waiting. Stop if protection
is missing or a newer image has superseded the release candidate.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant