From 1bd0a97d0c0fd6233751bd9c4e3a2a86598d6347 Mon Sep 17 00:00:00 2001 From: bfren Date: Sun, 22 Nov 2026 07:14:06 +0000 Subject: [PATCH 1/8] Bumping version to 6.0.3 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 7a9f89d..39c5d6a 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -6.0.2 \ No newline at end of file +6.0.3 \ No newline at end of file From 34f3cb8c55e04fef6ea809f7434df8c2972d230b Mon Sep 17 00:00:00 2001 From: bfren Date: Sun, 22 Nov 2026 07:42:16 +0000 Subject: [PATCH 2/8] Simplify README instructions Rewrite the Quickstart and other procedures as numbered steps with brief explanations of anything unusual, correct instructions that did not work when followed, and update the tag examples to 6.0.3. Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 10 ++++++++++ README.md | 33 ++++++++++++++++++++------------- 2 files changed, 30 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a03d33c..04196d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [6.0.3] - Unreleased + +### Fixed + +- README: said your changes to `postgresql.conf` and `pg_hba.conf` are always kept - a restore writes them again, so + copy them first. +- README: changing the password and moving a database between containers are now lists of steps, and the helper commands + table shows how to run each command. + ## [6.0.2] - 2026-11-10 ### Changed @@ -43,6 +52,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 that much memory to back up. - `pg-export dump` is refused - `/backup/dump.sql` would replace the whole cluster on the next start. +[6.0.3]: https://github.com/bfren/docker-postgresql/compare/v6.0.2...v6.0.3 [6.0.2]: https://github.com/bfren/docker-postgresql/compare/v6.0.1...v6.0.2 [6.0.1]: https://github.com/bfren/docker-postgresql/compare/v6.0.0...v6.0.1 [6.0.0]: https://github.com/bfren/docker-postgresql/compare/v5.0.0...v6.0.0 diff --git a/README.md b/README.md index 5d498bc..d5d551e 100644 --- a/README.md +++ b/README.md @@ -60,9 +60,9 @@ Images are published to Docker Hub (`bfren/postgresql`) and Quay.io (`quay.io/bf | `postgresqlN` | `postgresql18` | You want the latest image for a PostgreSQL version | | `postgresqlN-MAJOR` | `postgresql18-6` | You want updates, but not breaking changes | | `postgresqlN-MINOR` | `postgresql18-6.0` | You want fixes only - **recommended** | -| `postgresqlN-VERSION` | `postgresql18-6.0.2` | You want to pin this image exactly | +| `postgresqlN-VERSION` | `postgresql18-6.0.3` | You want to pin this image exactly | | `postgresqlN.M` | `postgresql18.6` | You want an exact PostgreSQL release | -| `postgresqlN.M-VERSION` | `postgresql18.6-6.0.2` | You want to pin both | +| `postgresqlN.M-VERSION` | `postgresql18.6-6.0.3` | You want to pin both | | PostgreSQL | Release | Alpine | Supported until | | ---------- | ------- | ------ | --------------- | @@ -127,7 +127,7 @@ This only happens once. Changing the variables later does **not** change the pas * Inside the container, any user can connect without a password (`trust`) - this is how the helper commands work. * From other containers and machines, users need a password (`scram-sha-256`), over IPv4 or IPv6. -To change these rules or tune PostgreSQL (e.g. `shared_buffers`), edit `/data/postgresql.conf` or `/data/pg_hba.conf` and restart the container. They are only generated when a cluster is created, so your changes are kept. The server time zone is set to `GB`. +To change these rules or tune PostgreSQL (e.g. `shared_buffers`), edit `/data/postgresql.conf` or `/data/pg_hba.conf` and restart the container. They are only generated when a cluster is created, so your changes are kept across restarts - but a [restore](#restore) creates a new cluster and writes them again, so copy your changes somewhere first and put them back afterwards. The server time zone is set to `GB`. ### Backups @@ -151,7 +151,11 @@ You can also restore while the container is stopped: put `dump.sql` or `dump.sql * `pg-export ` saves `/backup/.sql` - except for a database called `dump`, because `/backup/dump.sql` is restored over the whole cluster on the next start. * `pg-import ` runs `/backup/.sql` in that database, creating it (owned by the application user) if it doesn't exist. Files from `pg-export` and the per-database backup files drop and recreate the tables they contain. -To move a database between containers, `pg-export` in one, copy the file to the other's `/backup`, then `pg-import`. +To move a database between containers: + +1. In the old container, run `pg-export `. +2. Copy `/backup/.sql` into the new container's `/backup` volume. +3. In the new container, run `pg-import `. ### Version check @@ -166,15 +170,15 @@ To upgrade to a newer major version, move the data across in a dump: ### Helper commands -Run these with `docker exec `. +Run these with `docker exec `, e.g. `docker exec db pg-dump`. Interactive commands need `-it`: `docker exec -it db pg psql`. -| Command | Arguments | Description | -| ------------ | --------- | ------------------------------------------------------------------------- | -| `pg` | command | Run a command as `postgres`, e.g. `pg psql` (add `-it` to `docker exec`). | -| `pg-dump` | | Back up now. | -| `pg-restore` | folder | Replace the cluster with a backup folder's dump. | -| `pg-export` | database | Save a database to `/backup/.sql`. | -| `pg-import` | database | Run `/backup/.sql`, creating the database if needed. | +| Command | Description | +| ---------------------- | --------------------------------------------------------------------------- | +| `pg ` | Run a command as `postgres`, e.g. `pg psql`. | +| `pg-dump` | Back up now. | +| `pg-restore ` | Replace the whole cluster with a backup folder's dump, e.g. `202610171608`. | +| `pg-export ` | Save a database to `/backup/.sql`. | +| `pg-import ` | Run `/backup/.sql`, creating the database if needed. | ### Health check @@ -203,7 +207,10 @@ Check `docker logs `: ### I changed the password but can't log in -The password is only set on [first start](#first-start). Change it with `docker exec -it pg psql -c "ALTER USER myapp PASSWORD 'new';"`, then update `BF_PG_PASSWORD` to match. +The password is only set on [first start](#first-start), so changing the variable alone does nothing. To change it: + +1. Run `docker exec pg psql -c "ALTER USER myapp PASSWORD 'new-password';"`. Inside the container no password is needed, so this works whatever the old one was. +2. Update `BF_PG_PASSWORD` to match, so it is right if you ever start again with an empty `/data`. ### Another container can't connect From 198fc9668c35800fe4a355a478f55943cc381e3f Mon Sep 17 00:00:00 2001 From: bfren Date: Sun, 22 Nov 2026 07:43:18 +0000 Subject: [PATCH 3/8] Update the sample compose file to match the README It used PostgreSQL 16 and no password. It is now the README Quickstart example, which links to it. Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 1 + README.md | 2 ++ docker-compose.yml | 21 ++++++--------------- 3 files changed, 9 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 04196d0..7210a91 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 copy them first. - README: changing the password and moving a database between containers are now lists of steps, and the helper commands table shows how to run each command. +- `docker-compose.yml` now matches the README Quickstart - it used PostgreSQL 16 and no password. ## [6.0.2] - 2026-11-10 diff --git a/README.md b/README.md index d5d551e..aa0da0f 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,8 @@ services: - ./v/backup:/backup ``` +This example is also in [`docker-compose.yml`](docker-compose.yml). + `.env` (keep it out of version control): ```sh diff --git a/docker-compose.yml b/docker-compose.yml index 96fc85d..b260ed5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,19 +1,10 @@ services: - pgsql: - image: bfren/postgresql:postgresql16 - container_name: pgsql + db: + image: quay.io/bfren/postgresql:postgresql18-6.0 restart: unless-stopped environment: - - BF_PG_BACKUP_COMPRESS_FILES=1 - - BF_PG_BACKUP_KEEP_FOR=56day - - BF_PG_APPLICATION=test + - BF_PG_APPLICATION=myapp + - BF_PG_PASSWORD=${DB_PASSWORD} volumes: - - ./v/db:/data - - ./v/db-backup:/backup - networks: - - pgsql - -networks: - pgsql: - driver: bridge - name: pgsql + - ./v/data:/data + - ./v/backup:/backup From ba7e2a3197b9ecdc987e72cbfee6be70e616798b Mon Sep 17 00:00:00 2001 From: bfren Date: Sun, 22 Nov 2026 07:52:33 +0000 Subject: [PATCH 4/8] Link to the changelog from the Tags section A new MAJOR version means a breaking change, so say where those are listed before someone moves to one. Co-Authored-By: Claude Opus 5.5 --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index aa0da0f..7ff20a9 100644 --- a/README.md +++ b/README.md @@ -66,6 +66,8 @@ Images are published to Docker Hub (`bfren/postgresql`) and Quay.io (`quay.io/bf | `postgresqlN.M` | `postgresql18.6` | You want an exact PostgreSQL release | | `postgresqlN.M-VERSION` | `postgresql18.6-6.0.3` | You want to pin both | +A new `MAJOR` version means a breaking change. Before moving to one, read the [changelog](CHANGELOG.md), where each breaking change is marked **Breaking**. + | PostgreSQL | Release | Alpine | Supported until | | ---------- | ------- | ------ | --------------- | | 18 | 18.6 | 3.24 | November 2030 | From 6631b8bf35d002c2f7e83fb81fca108719729f86 Mon Sep 17 00:00:00 2001 From: bfren Date: Sun, 22 Nov 2026 08:13:07 +0000 Subject: [PATCH 5/8] Updating to PostgreSQL 15.20, 16.16, 17.12 and 18.7 --- 15/overlay/tmp/POSTGRESQL_BUILD | 2 +- 15/overlay/tmp/POSTGRESQL_MINOR | 2 +- 16/overlay/tmp/POSTGRESQL_BUILD | 2 +- 16/overlay/tmp/POSTGRESQL_MINOR | 2 +- 17/overlay/tmp/POSTGRESQL_BUILD | 2 +- 17/overlay/tmp/POSTGRESQL_MINOR | 2 +- 18/overlay/tmp/POSTGRESQL_BUILD | 2 +- 18/overlay/tmp/POSTGRESQL_MINOR | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/15/overlay/tmp/POSTGRESQL_BUILD b/15/overlay/tmp/POSTGRESQL_BUILD index 4f7accd..d2f3bc3 100644 --- a/15/overlay/tmp/POSTGRESQL_BUILD +++ b/15/overlay/tmp/POSTGRESQL_BUILD @@ -1 +1 @@ -15.19-r0 \ No newline at end of file +15.20-r0 \ No newline at end of file diff --git a/15/overlay/tmp/POSTGRESQL_MINOR b/15/overlay/tmp/POSTGRESQL_MINOR index 77d7e69..88378e1 100644 --- a/15/overlay/tmp/POSTGRESQL_MINOR +++ b/15/overlay/tmp/POSTGRESQL_MINOR @@ -1 +1 @@ -15.19 \ No newline at end of file +15.20 \ No newline at end of file diff --git a/16/overlay/tmp/POSTGRESQL_BUILD b/16/overlay/tmp/POSTGRESQL_BUILD index 53a6b44..3ce85a2 100644 --- a/16/overlay/tmp/POSTGRESQL_BUILD +++ b/16/overlay/tmp/POSTGRESQL_BUILD @@ -1 +1 @@ -16.15-r0 \ No newline at end of file +16.16-r0 \ No newline at end of file diff --git a/16/overlay/tmp/POSTGRESQL_MINOR b/16/overlay/tmp/POSTGRESQL_MINOR index 37cda8c..dc79191 100644 --- a/16/overlay/tmp/POSTGRESQL_MINOR +++ b/16/overlay/tmp/POSTGRESQL_MINOR @@ -1 +1 @@ -16.15 \ No newline at end of file +16.16 \ No newline at end of file diff --git a/17/overlay/tmp/POSTGRESQL_BUILD b/17/overlay/tmp/POSTGRESQL_BUILD index 0b59b3a..b1e54a9 100644 --- a/17/overlay/tmp/POSTGRESQL_BUILD +++ b/17/overlay/tmp/POSTGRESQL_BUILD @@ -1 +1 @@ -17.11-r0 \ No newline at end of file +17.12-r0 \ No newline at end of file diff --git a/17/overlay/tmp/POSTGRESQL_MINOR b/17/overlay/tmp/POSTGRESQL_MINOR index ddb9a6c..85ad71d 100644 --- a/17/overlay/tmp/POSTGRESQL_MINOR +++ b/17/overlay/tmp/POSTGRESQL_MINOR @@ -1 +1 @@ -17.11 \ No newline at end of file +17.12 \ No newline at end of file diff --git a/18/overlay/tmp/POSTGRESQL_BUILD b/18/overlay/tmp/POSTGRESQL_BUILD index e250cfc..8b250f7 100644 --- a/18/overlay/tmp/POSTGRESQL_BUILD +++ b/18/overlay/tmp/POSTGRESQL_BUILD @@ -1 +1 @@ -18.6-r0 \ No newline at end of file +18.7-r0 \ No newline at end of file diff --git a/18/overlay/tmp/POSTGRESQL_MINOR b/18/overlay/tmp/POSTGRESQL_MINOR index d86a139..ce89f2a 100644 --- a/18/overlay/tmp/POSTGRESQL_MINOR +++ b/18/overlay/tmp/POSTGRESQL_MINOR @@ -1 +1 @@ -18.6 \ No newline at end of file +18.7 \ No newline at end of file From b613c048c5edc85dc0d1730536894b13869110d8 Mon Sep 17 00:00:00 2001 From: bfren Date: Sun, 22 Nov 2026 08:20:01 +0000 Subject: [PATCH 6/8] Record the update to PostgreSQL 15.20, 16.16, 17.12 and 18.7 Add it to the changelog, and update the README's tag examples and supported versions table. Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 4 ++++ README.md | 12 ++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7210a91..a4badae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [6.0.3] - Unreleased +### Changed + +- PostgreSQL updated to 15.20, 16.16, 17.12 and 18.7. + ### Fixed - README: said your changes to `postgresql.conf` and `pg_hba.conf` are always kept - a restore writes them again, so diff --git a/README.md b/README.md index 7ff20a9..9702669 100644 --- a/README.md +++ b/README.md @@ -63,17 +63,17 @@ Images are published to Docker Hub (`bfren/postgresql`) and Quay.io (`quay.io/bf | `postgresqlN-MAJOR` | `postgresql18-6` | You want updates, but not breaking changes | | `postgresqlN-MINOR` | `postgresql18-6.0` | You want fixes only - **recommended** | | `postgresqlN-VERSION` | `postgresql18-6.0.3` | You want to pin this image exactly | -| `postgresqlN.M` | `postgresql18.6` | You want an exact PostgreSQL release | -| `postgresqlN.M-VERSION` | `postgresql18.6-6.0.3` | You want to pin both | +| `postgresqlN.M` | `postgresql18.7` | You want an exact PostgreSQL release | +| `postgresqlN.M-VERSION` | `postgresql18.7-6.0.3` | You want to pin both | A new `MAJOR` version means a breaking change. Before moving to one, read the [changelog](CHANGELOG.md), where each breaking change is marked **Breaking**. | PostgreSQL | Release | Alpine | Supported until | | ---------- | ------- | ------ | --------------- | -| 18 | 18.6 | 3.24 | November 2030 | -| 17 | 17.11 | 3.24 | November 2029 | -| 16 | 16.15 | 3.24 | November 2028 | -| 15 | 15.19 | 3.22 | November 2027 | +| 18 | 18.7 | 3.24 | November 2030 | +| 17 | 17.12 | 3.24 | November 2029 | +| 16 | 16.16 | 3.24 | November 2028 | +| 15 | 15.20 | 3.22 | November 2027 | | 14 | 14.17 | 3.20 | November 2026 | PostgreSQL supports each major version for five years - see the [versioning policy](https://www.postgresql.org/support/versioning/). Older versions still work, but get no more fixes: use them only to get existing data out. From 87328850146578bbc735fa45743dc5dcb098155d Mon Sep 17 00:00:00 2001 From: bfren Date: Wed, 25 Nov 2026 13:27:45 +0000 Subject: [PATCH 7/8] Using latest base images --- 14/Dockerfile | 2 +- 15/Dockerfile | 2 +- 16/Dockerfile | 2 +- 17/Dockerfile | 2 +- 18/Dockerfile | 2 +- generate-dockerfiles.sh | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/14/Dockerfile b/14/Dockerfile index 64ee82e..c8be7b0 100644 --- a/14/Dockerfile +++ b/14/Dockerfile @@ -1,4 +1,4 @@ -FROM quay.io/bfren/alpine-s6:alpine3.20-7.0.2 +FROM quay.io/bfren/alpine-s6:alpine3.20-7.0.3 LABEL org.opencontainers.image.source="https://github.com/bfren/docker-postgresql" diff --git a/15/Dockerfile b/15/Dockerfile index 658b9b4..55f6cfd 100644 --- a/15/Dockerfile +++ b/15/Dockerfile @@ -1,4 +1,4 @@ -FROM quay.io/bfren/alpine-s6:alpine3.22-7.0.2 +FROM quay.io/bfren/alpine-s6:alpine3.22-7.0.3 LABEL org.opencontainers.image.source="https://github.com/bfren/docker-postgresql" diff --git a/16/Dockerfile b/16/Dockerfile index 9caeff7..cce36f8 100644 --- a/16/Dockerfile +++ b/16/Dockerfile @@ -1,4 +1,4 @@ -FROM quay.io/bfren/alpine-s6:alpine3.24-7.0.2 +FROM quay.io/bfren/alpine-s6:alpine3.24-7.0.3 LABEL org.opencontainers.image.source="https://github.com/bfren/docker-postgresql" diff --git a/17/Dockerfile b/17/Dockerfile index 9f09099..8fff5f5 100644 --- a/17/Dockerfile +++ b/17/Dockerfile @@ -1,4 +1,4 @@ -FROM quay.io/bfren/alpine-s6:alpine3.24-7.0.2 +FROM quay.io/bfren/alpine-s6:alpine3.24-7.0.3 LABEL org.opencontainers.image.source="https://github.com/bfren/docker-postgresql" diff --git a/18/Dockerfile b/18/Dockerfile index 59cab6c..f44deb5 100644 --- a/18/Dockerfile +++ b/18/Dockerfile @@ -1,4 +1,4 @@ -FROM quay.io/bfren/alpine-s6:alpine3.24-7.0.2 +FROM quay.io/bfren/alpine-s6:alpine3.24-7.0.3 LABEL org.opencontainers.image.source="https://github.com/bfren/docker-postgresql" diff --git a/generate-dockerfiles.sh b/generate-dockerfiles.sh index 6ee8c3e..6dd3261 100755 --- a/generate-dockerfiles.sh +++ b/generate-dockerfiles.sh @@ -4,7 +4,7 @@ set -euo pipefail docker pull bfren/alpine -BASE_VERSION="7.0.2" +BASE_VERSION="7.0.3" echo "Base: ${BASE_VERSION}" POSTGRESQL_VERSIONS="14 15 16 17 18" From 55f30cef278127c19fcd5f77d0d1d74084f24f78 Mon Sep 17 00:00:00 2001 From: bfren Date: Wed, 25 Nov 2026 13:53:52 +0000 Subject: [PATCH 8/8] Prepping for release Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a4badae..af071cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,10 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [6.0.3] - Unreleased +## [6.0.3] - 2026-11-25 ### Changed +- Base image updated to `bfren/alpine-s6` 7.0.3, which rebuilds BusyBox, figlet and Nushell without changing + their versions - see the [Alpine + S6 changelog](https://github.com/bfren/docker-alpine-s6/blob/main/CHANGELOG.md). - PostgreSQL updated to 15.20, 16.16, 17.12 and 18.7. ### Fixed