Repository navigation
feat(image): build postgis and pgvector on the official alpine image - #1
Merged
Merged
Conversation
dargmuesli
enabled auto-merge (squash)
November 20, 2026 06:25
maevsi-bot
pushed a commit
that referenced
this pull request
Nov 20, 2026
|
🎉 This PR is included in version 1.0.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This image replaces both database images of the stack:
postgis/postgisfor the main database andpgvector/pgvectorfor the recommendation database, so both run the same PostgreSQL build with PostGIS and pgvector available.postgis/postgispublishes no arm64 image and Alpine's own packages lag behind at PostGIS 3.6, so PostGIS 3.7 and pgvector are compiled from source on the officialpostgres:18-alpineimage, following upstream's Alpine Dockerfile, and the image is published for amd64 and arm64. The arm64 build compiles under emulation and takes about 25 minutes, which a native arm64 runner in the shared Docker workflow could cut down later.The base stays on Alpine, like the current
postgis/postgisimage of the stack, because moving existing databases to a glibc based image would change their collation and invalidate their text indexes. Unlikepostgis/postgis, the image has no init script that creates PostGIS: both extensions are only installed, and the services using them create them in their own migrations,sqitchfor PostGIS since maevsi/sqitch's next major andreccoomfor pgvector, which also reach existing databases, while an init script only ever runs for a new data directory. pgvector is built without CPU specific optimizations so the image runs on any machine of its architecture.The repository follows the tooling of the other image repositories: CI builds the image for both architectures, runs a smoke test that checks the extensions and a spatial and a vector query, and releases with semantic-release from git tags. Image scans, registry cleanup and Renovate are set up too. Renovate also tracks the PostGIS and pgvector versions, and leaves the updates that need care to a manual merge: PostgreSQL majors, which need an upgrade of every deployed database, PostGIS majors, which rename its library, and pgvector updates above patch level while it is on 0.x.