fix(docker): install PostgreSQL 18 client so dbbackup works#15306
Merged
Maffooch merged 1 commit intoJul 23, 2026
Merged
Conversation
The bundled PostgreSQL server is 18.x, but the client tools shipped in the images lagged behind (Debian: 17, Alpine/nginx: 16). pg_dump refuses to dump a server newer than itself, so `manage.py dbbackup` failed with "aborting because of server version mismatch". Align the client to the server (v18): - Alpine images: bump base to alpine3.23 and use postgresql18-client (18 is not available in the alpine3.22 repos). - Debian image: add the PostgreSQL APT (PGDG) repository and install postgresql-client-18 (Debian trixie only ships v17). Fixes DefectDojo#15301
blakeaowens
approved these changes
Jul 22, 2026
Maffooch
approved these changes
Jul 23, 2026
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
manage.pyscript is not working because of server version mismatch #15301:./manage.py dbbackupfails withpg_dump: error: aborting because of server version mismatchbecause the PostgreSQL client tools in the images are older than the bundled PostgreSQL 18 server, andpg_dumprefuses to dump a server newer than itself.postgresql-clienton trixie), and the Alpine/nginx images shipped v16 (postgresql16-client).Dockerfile.django-alpine,Dockerfile.nginx-alpine): bump the base image toalpine3.23and installpostgresql18-client. The v18 client is not available in thealpine3.22package repos, so the base bump is required. The nginx build-stage base is kept identical to the django build stage to preserve Docker layer caching.Dockerfile.django-debian): Debian trixie only shipspostgresql-client-17, so add the PostgreSQL APT (PGDG) repository and installpostgresql-client-18in the release stage.