Commit Graph

32 Commits

Author SHA1 Message Date
Tianon Gravi 5ec8931249 Remove intentionally-breaking "data" symlink and add better detection
This allows for a more graceful error message for the case of users who need to update their volume path.

I tested this with 17 and `--env PGDATA=/var/lib/postgresql/17/docker` (to make sure it still works fine and doesn't complain about the extra volume provided by Docker/`VOLUME`) and 18 with `-v /var/lib/postgresql/data` (where it appropriately errors and explains to me what I should be doing instead).

I also did a reflow on some text in the error message that's designed to fit in 80 columns but was taking 81. 😂
2025-10-15 11:23:03 -07:00
Tianon Gravi a2433755c7 Update gosu to 1.19 2025-09-23 12:31:05 -07:00
Tianon Gravi a3b3bfabd3 Update gosu to 1.18 2025-09-08 13:04:25 -07:00
Peter A. Jonsson abab72cc73 debian: align postgres repo url with docs
The PostgreSQL documentation for packages
(https://www.postgresql.org/download/linux/ubuntu/)
does not have a trailing slash.
2025-09-03 23:48:27 +02:00
Docker Library Bot b8ab4185a3 Update 15 to 15.14, trixie 15.14-1.pgdg13+1, bookworm 15.14-1.pgdg12+1 2025-08-14 09:40:39 -07:00
Tianon Gravi 2c6fe8daca Add logic to error out on detection of "old databases" 2025-06-06 11:27:47 -07:00
Joseph Ferguson d9c4773ca5 Update apt build depend 2025-05-21 17:48:07 -07:00
Tianon Gravi 266748257c Update to 17.5, 16.9, 15.13, 14.18, 13.21 2025-05-08 10:29:08 -07:00
Paul Liétar cc254e85ed
Unset NOTIFY_SOCKET when running the temporary server. (#1325)
* Unset NOTIFY_SOCKET when running the temporary server.

Postgres has native support for this notification socket and will write a `READY=1` message once it is ready and accepting connections. Unfortunately, the temporary server used by the `docker-entrypoint.sh` also sends a message on the socket, making it appear as though the container is ready and serving connections when it is not.
2025-02-26 16:53:12 -08:00
Docker Library Bot 807e218040 Update 15 to 15.12, bookworm 15.12-1.pgdg120+1, bullseye 15.12-1.pgdg110+1 2025-02-20 11:30:20 -08:00
Docker Library Bot 607fdbdadc Update 15 to 15.11, bookworm 15.11-1.pgdg120+1, bullseye 15.11-1.pgdg110+1 2025-02-13 10:31:47 -08:00
Joseph Ferguson 042d8d043f Remove PostgreSQL 12 since it is end of life 2025-02-03 16:55:44 -08:00
Jeremy Schneider 32b6fcdda7
Remove inaccurate references to corruption, remove SEGTERM suggestion… (#1303)
* Remove inaccurate references to corruption, remove SEGTERM suggestion, update information links to current docs. Postgres is carefully designed such that data is not corrupted on crashes or unclean shutdowns - the main tradeoff is that WAL replay is needed on startup. In practice, SIGTERM can cause unexpected long delays to shutdowns - often during maintenance windows - so best not to actively suggest this. The links back to official Postgres documentation seem sufficient.
2025-01-09 09:56:49 -08:00
Docker Library Bot 50b4cdb50e Update 15 to 15.10, bookworm 15.10-1.pgdg120+1, bullseye 15.10-1.pgdg110+1 2024-11-21 12:12:11 -08:00
Docker Library Bot 89e0c9265d Update 15 to 15.9, bookworm 15.9-1.pgdg120+1, bullseye 15.9-1.pgdg110+1 2024-11-14 11:20:16 -08:00
Docker Library Bot 8cce578a43 Update 15 to 15.8, bookworm 15.8-1.pgdg120+1, bullseye 15.8-1.pgdg110+1 2024-08-08 10:06:32 -07:00
Tianon Gravi a09f1c441f Use `install` instead of `mkdir && chown && chmod` 2024-07-08 15:18:09 -07:00
Docker Library Bot 8a0b96710d Update 15 to 15.7, bookworm 15.7-1.pgdg120+1, bullseye 15.7-1.pgdg110+1 2024-05-09 11:44:17 -07:00
Jamie Finnigan ab6925051c update to gosu 1.17 2024-02-20 16:46:13 -08:00
Docker Library Bot 34d4c14c23 Update 15 to bookworm 15.6-1.pgdg120+2, bullseye 15.6-1.pgdg110+2 2024-02-12 11:12:29 -08:00
Docker Library Bot 539bdac35d Update 15 to 15.6, bookworm 15.6-1.pgdg120+1, bullseye 15.6-1.pgdg110+1 2024-02-08 11:40:08 -08:00
Tianon Gravi d416768b1a Add `less` to Debian variants
https://www.postgresql.org/docs/16/app-psql.html#APP-PSQL-META-COMMAND-PSET-PAGER
https://github.com/postgres/postgres/blob/REL_16_1/src/include/fe_utils/print.h#L25
(if "less" is available, it gets used as the default pager for psql, and it only adds ~1.5MiB to our image size)
2024-01-04 13:52:40 -08:00
Tianon Gravi ce5bf6e7eb
Merge pull request #1166 from infosiftr/unlimited-passwords
Only print password length warning for 12 and 13
2023-12-21 16:27:15 -08:00
Tianon Gravi 7dece99f91 Only print password length warning for 12 and 13
In 14+, the arbitrary length limitations have been removed from the PostgreSQL server (67a472d71c).
2023-12-11 11:39:54 -08:00
Tianon Gravi c86568af4a Add new "docker-ensure-initdb.sh" script
This mimics the behavior of `docker-entrypoint.sh` before it starts the PostgreSQL server.

It has three main goals/uses:

  1. (most importantly) as an example of how to use "docker-entrypoint.sh" to extend/reuse the initialization behavior

  2. ("docker-ensure-initdb.sh") as a Kubernetes "init container" to ensure the provided database directory is initialized; see also "startup probes" for an alternative solution
       (no-op if database is already initialized)

  3. ("docker-enforce-initdb.sh") as part of CI to ensure the database is fully initialized before use
       (error if database is already initialized)
2023-12-11 10:58:54 -08:00
Lukas Fittl a42b684558 Debian packages: Add explicit check for locale-gen creating locales
In case Debian changes the logic of how locale-gen works, this will flag
it early during the build process.
2023-12-07 14:39:53 -08:00
Lukas Fittl 55e45ba6bb Debian images: Use locale-gen instead of localdef
The use of manually calling localdef caused any future update to the
locales package to remove the manually installed locales, since
locale-gen takes precendence. This would usually be encountered when
a downstream Dockerfile added additional packages, and as a side effect
caused an upgrade to the locales package.

Fix by relying on the /etc/locale.gen file, which is the official place
to specify which locales should be installed.

Fixes #1112
2023-12-07 13:17:35 -08:00
Tianon Gravi 2468c9d91a Update permissions from 777 to 1777 (redux)
I somehow missed Debian in 25b3034e9b (only updated Alpine), so this updates Debian in the same way.

> This still supports the "arbitrary user" use case but with slightly tighter permissions on the end result.
>
> This one is a little bit more "special" other images (due to the existing runtime/entrypoint modification of the directory modes) so I've tried to pick reasonable values for both halves.
2023-11-29 16:11:07 -08:00
Docker Library Bot da624f9e2e Update 15 to 15.5, bookworm 15.5-1.pgdg120+1, bullseye 15.5-1.pgdg110+1 2023-11-09 11:51:15 -08:00
Docker Library Bot 8a631b939a Update 15 to bookworm 15.4-2.pgdg120+1, bullseye 15.4-2.pgdg110+1 2023-09-14 11:02:56 -07:00
Docker Library Bot 1a73ab671b Update 15 to 15.4, bookworm 15.4-1.pgdg120+1, bullseye 15.4-1.pgdg110+1 2023-08-10 11:46:34 -07:00
Joseph Ferguson 3fda89cc5c Add Debian bookworm variant 2023-06-13 14:17:18 -07:00