Commit Graph

96 Commits

Author SHA1 Message Date
Tianon Gravi 3e9b4eaaeb Replace `su-exec` with `gosu`
There's a major issue with `su-exec` whose fix has gone unreleased for 5 years (typos leading to running code as root, the opposite of the purpose of the program).

This also decreases our Debian vs Alpine variance.

Due to user scripts/downstream code potentially using `su-exec`, I have included a compatibility symlink to `su-exec` for all versions less than the 17 pre-release.
2024-06-03 13:57:56 -07:00
Laurent Goderre 3a7be2f321 fixup 2024-05-31 09:43:40 -04:00
Earlopain 930acaf01f
Update to alpine 3.20 2024-05-22 22:39:44 +02:00
Docker Library Bot f3ab8c6db6 Update 13 to 13.15, bookworm 13.15-1.pgdg120+1, bullseye 13.15-1.pgdg110+1 2024-05-09 11:16:46 -07:00
Jamie Finnigan ab6925051c update to gosu 1.17 2024-02-20 16:46:13 -08:00
Docker Library Bot a2de6cd9b0 Update 13 to bookworm 13.14-1.pgdg120+2, bullseye 13.14-1.pgdg110+2 2024-02-12 11:05:32 -08:00
Docker Library Bot c3c66a1929 Update 13 to 13.14, bookworm 13.14-1.pgdg120+1, bullseye 13.14-1.pgdg110+1 2024-02-08 11:16:28 -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
yosifkit 31aed10dbe
Merge pull request #1150 from infosiftr/docker-ensure-initdb
Add new "docker-ensure-initdb.sh" script
2023-12-13 14:17:08 -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
Laurent Goderre 1d4651c6c9 Revert "Added inline SBOM for binaries downloaded outside package manager"
This reverts commit 6f4ae83640.
2023-12-11 14:03:58 -05: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
Earlopain 25f6ba56f9
Add alpine 3.19 2023-12-08 12:47:00 +01: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 ce930677d5 Update 13 to 13.13, bookworm 13.13-1.pgdg120+1, bullseye 13.13-1.pgdg110+1 2023-11-09 11:28:24 -08:00
Laurent Goderre 6f4ae83640 Added inline SBOM for binaries downloaded outside package manager 2023-10-04 10:54:45 -04:00
Docker Library Bot 69cf8b8aac Update 13 to 13.12, bookworm 13.12-1.pgdg120+1, bullseye 13.12-1.pgdg110+1 2023-08-10 11:25:03 -07:00
Joseph Ferguson 3fda89cc5c Add Debian bookworm variant 2023-06-13 14:17:18 -07:00
Tianon Gravi 5ea98fe00b Add support for multiple (up to two) concurrent Alpine versions 2023-05-17 15:58:36 -07:00
Tianon Gravi fbc438936d Add `--enable-option-checking=fatal` to `configure` flags
Also, remove deprecated/removed `--with-krb5` (deprecated in 8.3, removed in 9.4; 98de86e422).
2023-05-12 16:51:33 -07:00
Joseph Ferguson a3b0bb68fa Downgrade llvm to 15 to fix jit support 2023-05-12 15:21:44 -07:00
Docker Library Bot 43d17d5ced Update 13 to 13.11, bullseye 13.11-1.pgdg110+1 2023-05-11 11:13:14 -07:00
J0WI 6efe206eaa Alpine 3.18 2023-05-10 19:56:30 +02:00
Tianon Gravi dd68d91377 Remove explicit `dirmngr` reference
This is pulled in automatically via `gnupg`, and moved from `Recommends` to `Depends` in 99474ad900, which has been part of `src:gnupg2` since 2.1.21-4 (and every supported version of both Debian _and_ Ubuntu have 2.2.x 😇).
2023-04-28 15:09:00 -07:00
Tianon Gravi 25b3034e9b Update permissions from 777 to 1777
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-03-10 16:05:33 -08:00
Docker Library Bot c5d3ed25ba Update 13 to 13.10, bullseye 13.10-1.pgdg110+1 2023-02-09 11:06:56 -08:00
Tianon Gravi 186c93e85d Update to gosu 1.16
See https://github.com/tianon/gosu/releases/tag/1.16 (especially https://github.com/tianon/gosu/blob/master/SECURITY.md)
2023-01-30 10:41:32 -08:00
Joe Ferguson 6ee0f2865b Skip unavailable nss_wrapper on ppc64le 2022-12-22 14:28:39 -08:00
Stan Hu 41bd7bf3f4
Add newline to `POSTGRES_PASSWORD` file for initdb
https://github.com/docker-library/postgres/issues/1024 converted all
`echo` calls to `printf`, but this change causes the password file
used by `initdb` to be blank rather than contain a single newline.
As a result, `initdb` will fail to start with an empty value with
the error:

```
initdb: error: password file "/dev/fd/63" is empty
```

`POSTGRES_PASSWORD` can be blank if `POSTGRES_HOST_AUTH_METHOD=trust`
is used. This change adds a newline to restore the original behavior.

Closes #1025
2022-12-22 13:40:11 -08:00
Tianon Gravi 7e5e7ece73 Convert all entrypoint "echo"s to "printf"
The use of the `echo` shell built-in has been actively discouraged for a long time, but it's really convenient so we keep doing it.  This converts them all to use `printf` appropriately such that we avoid issues like `echo "$someVar"` from doing the wrong thing if `$someVar` is `-n` or similar.
2022-12-21 10:42:36 -08:00
Wolfgang Walther a2d5beb991
Add nss_wrapper to alpine images to run container with different user
Signed-off-by: Wolfgang Walther <walther@technowledgy.de>
2022-11-30 21:32:37 +01:00
Wolfgang Walther a0d95cc7bb
Update to alpine 3.17 2022-11-30 17:06:55 +01:00
Docker Library Bot 883b1c3f7b Update 13 to 13.9, bullseye 13.9-1.pgdg110+1 2022-11-10 11:11:01 -08:00
Docker Library Bot 701a1643a2 Update 13 to 13.8, bullseye 13.8-1.pgdg110+1 2022-08-11 11:10:58 -07:00
Tianon Gravi b979def1c4
Merge pull request #964 from fjf2002/patch-1
prep for possible `set -u` in docker-entrypoint.sh
2022-06-16 15:55:41 -07:00
fjf2002 74e51d102a prep for possible `set -u` in docker-entrypoint.sh
Update docker-entrypoint.sh
2022-06-16 15:11:37 -07:00
Tianon Gravi 899a216e56 Add "icu-data-full" to all Alpine images
See https://wiki.alpinelinux.org/wiki/Release_Notes_for_Alpine_3.16.0#ICU_data_split
2022-06-03 10:11:20 -07:00
J0WI 1ae967e643 Alpine 3.16 2022-05-24 19:55:03 +02:00
Docker Library Bot f060d12360 Update 13 to 13.7, bullseye 13.7-1.pgdg110+1 2022-05-12 11:13:23 -07:00
Tianon Gravi e483778176 Remove unnecessary comment 2022-03-28 12:18:08 -07:00
Bjoern Hiller b4604f5e16
Fix new zstd support for alpine images
In e8ebf74e50 zstd was installed as build
dependency and thus does not end up in the final image which in turn
renders docker-entrypoint.sh broken when using *.sql.zst files.
2022-03-26 08:20:40 +01:00
Héctor Molinero Fernández e8ebf74e50 Add .sql.zst support to docker-entrypoint-initdb.d 2022-03-04 17:28:24 -08:00
Tianon Gravi 36abfddd6f Remove 9.6 (EOL)
See https://www.postgresql.org/about/news/postgresql-141-135-129-1114-1019-and-9624-released-2349/

> Additionally, this is the final release of PostgreSQL 9.6. If you are running PostgreSQL 9.6 in a production environment, we suggest that you make plans to upgrade.
2022-02-11 17:52:48 -08:00
Tianon Gravi 72e336d9d3 Also add "clang-6.0" explicitly on stretch builds of 11+
See e914bb060a (and the Dockerfile comment).
2022-02-11 16:50:10 -08:00
Tianon Gravi 6ef8010b6e Fix deb-build with newer packages that Build-Depends: postgresql-common
See 99f44476e2
2022-02-11 16:37:46 -08:00
Tianon Gravi 7f810c00e1
Merge pull request #921 from infosiftr/signed-by
Narrow postgres apt key package scope
2022-02-11 10:41:09 -08:00
Docker Library Bot cbab7c1e5d Update 13 to 13.6, bullseye 13.6-1.pgdg110+1 2022-02-10 11:22:12 -08:00