forked from repo-mirrors/cnpg-postgres-containers
When building a system image, we start from a community postgres image. There is the chance that newer postgres packages are released, and they could be upgraded when installing the supported extensions. We want to prevent this scenario, as it could lead to unexpected versions in the container image. Closes #186 Signed-off-by: Francesco Canovai <francesco.canovai@enterprisedb.com>
Debian-based Container Images
This folder contains the Dockerfile manifests needed to build Debian-based
PostgreSQL operand container images for use with CloudNativePG.
The images are based on the official PostgreSQL images on DockerHub.
The folder includes:
- Directories for each supported PostgreSQL version.
- Image catalog files for each Debian version.
- Templates for the main
Dockerfileand the beta versionDockerfile(typically identical, except for some extensions that are not ready for the new major release of PostgreSQL). - The
requirements.infile required to build Barman Cloud images. (Note: This file will be removed once a Barman Cloud plugin supporting CNPG-I is distributed.) - The main update script.
Adding a New Beta Version
To add a new beta version, follow these steps:
- Create a new issue in the "postgres-containers" project with the title "Add PostgreSQL XX beta1 images".
- Clone the
postgres-containersrepository. - Create a new branch named after the issue ID (e.g.,
dev/YYY). - Create the
Debian/XX/directory. - Identify the latest Debian version name (e.g.,
bookworm). - Run
Debian/update.sh XX -d bookwormwhich will create a.versions.jsonfile into theDebian/XX/bookworm/directory. - Add the new directory to your commit and push the changes.
- Run the
Automatic updatesaction on the branch and wait for it to complete (this will add a commit to the branch). - Submit a pull request.
Troubleshooting
Common issues
- Error while running
update.sh
sed: can't read requirements.txt: No such file or directory
cat: requirements.txt: No such file or directory
rm: cannot remove 'requirements.txt': No such file or directory
If a similar error appears, the reason is that you are missing the
pip-compile utility that's needed to build the python requirements
for Barman Cloud. (Note: This requirement will be removed once a
Barman Cloud plugin supporting CNPG-I is distributed.)