Skip to content

feat(image): build postgis and pgvector on the official alpine image - #1

Merged
dargmuesli merged 5 commits into
mainfrom
feat/image/pgvector
Nov 20, 2026
Merged

dargmuesli merged 5 commits into
mainfrom
feat/image/pgvector

Conversation

@dargmuesli

@dargmuesli dargmuesli commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

This image replaces both database images of the stack: postgis/postgis for the main database and pgvector/pgvector for the recommendation database, so both run the same PostgreSQL build with PostGIS and pgvector available. postgis/postgis publishes 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 official postgres:18-alpine image, 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/postgis image of the stack, because moving existing databases to a glibc based image would change their collation and invalidate their text indexes. Unlike postgis/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, sqitch for PostGIS since maevsi/sqitch's next major and reccoom for 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.

@dargmuesli
dargmuesli enabled auto-merge (squash) November 20, 2026 06:25
@dargmuesli
dargmuesli merged commit abe8dda into main Nov 20, 2026
6 checks passed
@dargmuesli
dargmuesli deleted the feat/image/pgvector branch November 20, 2026 06:29
maevsi-bot pushed a commit that referenced this pull request Nov 20, 2026
## 1.0.0 (2026-11-20)

### Features

* **image:** build postgis and pgvector on the official alpine image ([#1](#1)) ([abe8dda](abe8dda))
@maevsi-bot

Copy link
Copy Markdown

🎉 This PR is included in version 1.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants