Skip to content

Latest commit

 

History

History
44 lines (29 loc) · 5.42 KB

README.md

File metadata and controls

44 lines (29 loc) · 5.42 KB

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.

Versioning Warning:

Pin a digest to avoid breaking changes

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 ;)

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 ppc64le build status badge s390x build status badge
put-shared build status badge