Docker Official Image packaging for Postgres
Go to file
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
.github/workflows Add the ability for us to manually trigger GitHub tests 2023-05-12 13:57:59 -07:00
12 Add new "docker-ensure-initdb.sh" script 2023-12-11 10:58:54 -08:00
13 Add new "docker-ensure-initdb.sh" script 2023-12-11 10:58:54 -08:00
14 Add new "docker-ensure-initdb.sh" script 2023-12-11 10:58:54 -08:00
15 Add new "docker-ensure-initdb.sh" script 2023-12-11 10:58:54 -08:00
16 Add new "docker-ensure-initdb.sh" script 2023-12-11 10:58:54 -08:00
.gitattributes Add new "docker-ensure-initdb.sh" script 2023-12-11 10:58:54 -08:00
.gitignore Added inline SBOM for binaries downloaded outside package manager 2023-10-04 10:54:45 -04:00
AUTHORS LICENSE (the MIT License) and AUTHORS 2014-09-04 17:43:59 -07:00
Dockerfile-alpine.template Add new "docker-ensure-initdb.sh" script 2023-12-11 10:58:54 -08:00
Dockerfile-debian.template Add new "docker-ensure-initdb.sh" script 2023-12-11 10:58:54 -08:00
LICENSE Remove ending year from LICENSE 2018-07-30 09:15:32 -07:00
README.md Update generated README 2022-12-20 14:23:18 -08:00
apply-templates.sh Add new "docker-ensure-initdb.sh" script 2023-12-11 10:58:54 -08:00
docker-ensure-initdb.sh Add new "docker-ensure-initdb.sh" script 2023-12-11 10:58:54 -08:00
docker-entrypoint.sh Add new "docker-ensure-initdb.sh" script 2023-12-11 10:58:54 -08:00
generate-stackbrew-library.sh Move latest to 16 2023-09-14 14:33:51 -07:00
update.sh Add initial jq-based templating engine 2021-06-16 10:36:52 -07:00
versions.json Remove PostgreSQL 11 since it is end of life 2023-12-11 09:15:45 -08:00
versions.sh Remove PostgreSQL 11 since it is end of life 2023-12-11 09:15:45 -08:00

README.md

https://github.com/docker-library/postgres

Maintained by: the PostgreSQL Docker Community

This is the Git repo of the Docker "Official Image" for postgres (not to be confused with any official postgres image provided by postgres upstream). See the Docker Hub page for the full readme on how to use this Docker image and for information regarding contributing and issues.

The full image description on Docker Hub is generated/maintained over in the docker-library/docs repository, specifically in the postgres directory.

See a change merged here that doesn't show up on Docker Hub yet?

For more information about the full official images change lifecycle, see the "An image's source changed in Git, now what?" FAQ entry.

For outstanding postgres image PRs, check PRs with the "library/postgres" label on the official-images repository. For the current "source of truth" for postgres, see the library/postgres file in the official-images repository.


  • build status badge
  • build status badge
Build Status Badges (per-arch)
amd64 build status badge arm32v5 build status badge arm32v6 build status badge arm32v7 build status badge
arm64v8 build status badge i386 build status badge mips64le build status badge ppc64le build status badge
s390x build status badge put-shared build status badge