pgautoupgrade This is a PostgreSQL Docker image to automatically upgrade your database. Its whole purpose in life is to automatically detect the version of PostgreSQL used in the existing PostgreSQL data directory, then automatically upgrade it (if needed) to the required version of PostgreSQL using pg_upgrade with the --link option. After this, the PostgreSQL server starts and runs as per normal. The old cluster data will be removed. The reason this Docker image is needed, is because the official Docker PostgreSQL image has no ability to handle version upgrades, which leaves people to figure it out manually (not great): docker-library/postgres#37 Warning Backup your data! This Docker image does an in-place upgrade of the database data, so if something goes wrong you are expected to already have backups you can restore from. Important Also, remove any healthchecks. Due to how we perform the update process, we had to implement our own healthcheck. So no extra healthcheck is needed. How to use this image This image is on Docker Hub: https://hub.docker.com/r/pgautoupgrade/pgautoupgrade To always use the latest version of PostgreSQL, use the tag latest : pgautoupgrade/pgautoupgrade:latest Please note that our latest tag is based on Alpine Linux, whereas the latest tag used by the official Docker Postgres container is based on Debian (see also the section on Debian vs Alpine based images). If you instead want to run a specific version of PostgreSQL then pick a matching tag on our Docker Hub. For example, to use PostgreSQL 17 you can use the 17-alpine tag: pgautoupgrade/pgautoupgrade:17-alpine Note The images available in Github Container Registry are for debugging purposes only. They are built from specific code branches for easier distribution and testing of fixes. Debian vs Alpine based images The default official Docker PostgreSQL image is Debian Linux based, and upgrading from that to one of our Alpine Linux based images doesn't always work out well. To solve that pr...
First seen: 2025-08-17 21:36
Last seen: 2025-08-17 23:39