Harden published Docker image and GHCR publish workflow#223
Merged
Conversation
- Pin init script to the postgres database so POSTGRES_DB cannot desync the extension from the worker (Dockerfile.release) - Install the .deb via apt so declared deps resolve - Add a HEALTHCHECK to the published image - Expand README Docker/Packages docs with GHCR tag listing and PG17/PG18 run examples - Add fix.md triage of remaining Docker-publish improvements
- Default dry_run to true for manual dispatch - Add --limit to gh release list for highest-stable resolution - Add overwrite input to protect immutable X.Y.Z-pg<major> tags - Smoke test now runs a durable function end-to-end - Publish with provenance + SBOM via cache-backed second build
- Correct stale 'production Dockerfile' HTTP-feature claim (http-security) - Move GHCR run examples into Packages; PG17/PG18 side-by-side + psql - Note POSTGRES_DB is ignored and recommend pinning immutable tags - Clarify GHCR image vs source Dockerfile are different artifacts - Add Step 7b GHCR publish runbook (ref/dry_run/overwrite inputs)
This was referenced Jun 17, 2026
Closed
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
Follow-up improvements to the GHCR Docker-publishing work added across #218 and #222 (reviewed as a combined change, since #222 partly reversed #218). Scope is the published image and its publish workflow plus related docs; the local-dev Docker CI is intentionally untouched.
Image hardening (
Dockerfile.release)postgresdatabase. The init script now connects with--dbname postgresinstead of$POSTGRES_DB, soPOSTGRES_DBcan no longer desync the extension from the background worker (which targetspostgres). Previously,-e POSTGRES_DB=myappwould silently install the extension where the worker never looks..debviaaptso any dependencies the package declares resolve automatically (instead of baredpkg -i).HEALTHCHECKbased onpg_isreadyagainst thepostgresdatabase.Publish workflow hardening (
docker-publish.yml)dry_runtotruefor manualworkflow_dispatch, so pushing is a deliberate choice; release events still publish.--limit 1000togh release listso the "highest stable release" computation isn't capped at the default 30.overwriteinput (defaultfalse): immutableX.Y.Z-pg<major>tags are skipped if already present unlessoverwrite=true; floatingpg<major>/latesttags always move forward.df.start('SELECT 1')and pollsdf.statustocompleted, proving the background worker actually executes (would have caught thePOSTGRES_DBmismatch above).build-push-action(push: true,provenance,sbom) publishes the byte-identical image with attestations, since a--loaded image can't carry them.Documentation
docs/http-security.md: corrected the stale "productionDockerfile" claim — the sourceDockerfileuseshttp-allow-test-domains; the released.deb/Dockerfile.releaseusehttp-allow-azure-domains.README.md: moved the GHCR run examples into the Packages section (PG17 + PG18 side by side withpsql), noted thatPOSTGRES_DBis ignored, recommended pinning immutable tags, and clarified that the GHCR image and the sourceDockerfileare different artifacts. The Development → Docker subsection now keeps only the from-source flow.prompts/pg_durable-release.md: added a "Publish the Public Image to GHCR" runbook covering theref/dry_run/overwriteinputs and typical flows.Notes / deferred
Testing
Trigger workflow on this PR branch, set dry run to true.