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.
Docker "Official Images" use tags that correspond to the version of the application they run (in our case, Postgres) and therefore do not typically have any way of indicating changes (even breaking changes) to the image configuration in their tags or "version numbers". Because of this, it is highly recommended that you "pin" a specific SHA digest of this image wherever it is used if you need to avoid breaking changes.
The digest for every tag is available on Docker Hub. For instance, if you visit the tags page for Postgres, and click on "12.2" you will see the sha256-digest for the most recent build of "12.2" at the top of the page. This can be used to pin your image reference to that specific build of the image so that nothing will ever change in your environment unless you explicitly update it. For instnace, in a Docker Compose configuration, you might use something like:
# docker-compose.yaml
version: '3.3'
services:
db:
image: postgres:12.2@sha256:b2f01d9d6928992adc1b96cc57ea350ecd131f9f580961c4a95fc8c58553e3b5
...
Note: This also prevents you from receiving important security and bug-fix updates, so you'll have to remember to update the digest yourself on a regular basis. Choose your poison wisely ;)
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 | Badges | (per-arch) |
---|---|---|---|