Repository navigation
refactor: Replace Go installer with multi-stage Dockerfile and Bake - #16
Merged
Merged
Conversation
The Go binary (plyd/instance/utils) reimplemented what Docker already does and silently skipped unsupported versions, so `latest` could ship without extensions and `make test` (PG 13) tested nothing. - Dockerfile: extensions built from source in throwaway stages and copied into the final image; PostGIS pinned from PGDG apt. All versions pinned via ARGs that Renovate tracks. - docker-bake.hcl: single source of truth for PG versions and tags. `latest` is an explicit alias of the newest supported major. - Tests: one functional test.sql per extension, run by tests/run.sh against the final image. - CI: one workflow that builds and tests every version on native amd64 and arm64 runners and publishes only the tested images. - Releases: vX.Y.Z git tags publish immutable <pg>-vX.Y.Z tags and <pg>-vX compatible-update tags, plus a GitHub release listing exact versions. Weekly rebuilds only move <pg> and latest. - pgvector is built with OPTFLAGS="" so it no longer uses -march=native. - Docs rewritten (EN/ES). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QTN7At86i5TYDmozENSNv8
A skipped matrix job shows its name unexpanded, so pull requests listed
"Publish ${{ matrix.target }}".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QTN7At86i5TYDmozENSNv8
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.
Summary
Replaces the Go installer (
plyd,instance,utils,extensions/*.go) with a declarative setup. The image definition is now a multi-stageDockerfileplus adocker-bake.hclthat lists the PostgreSQL versions and tags.Problems this fixes in the current setup
postgres:latestmoves to PG 19,ruxwez/postgres:latestwould have been published without extensions.make testran on PG 13, where every installer step was skipped, so it tested nothing.pg_stat_statementscheck always passed.-march=native, so images could crash with an illegal instruction on older CPUs.What changes
Dockerfile(one throwaway stage per source-built extension)docker-bake.hclextensions/<name>/test.sqlper extension, run bytests/run.shARGs that Renovate tracks (GitHub tags and the PGDG apt index)Release scheme (new). Pushing a
vX.Y.Zgit tag publishes:<pg>-vX.Y.Z: immutable, and CI refuses to overwrite it;<pg>-vX: compatible updates only;Weekly rebuilds only move
<pg>andlatest.Extension versions are unchanged: pgvector 0.8.2, pgmq 1.11.1, PostGIS 3.6.4.
Testing
Run locally:
postgres:18fails as expected.Not testable before merge:
main.v*tags.This PR's CI covers build and test for all 10 combinations (5 versions × 2 architectures).
After merge
14–18andlatest.v1.0.0.🤖 Generated with Claude Code
https://claude.ai/code/session_01QTN7At86i5TYDmozENSNv8