|
| 1 | +# Debian-based Container Images |
| 2 | + |
| 3 | +This folder contains the `Dockerfile` manifests needed to build Debian-based |
| 4 | +PostgreSQL operand container images for use with CloudNativePG. |
| 5 | + |
| 6 | +The images are based on the official [PostgreSQL images on |
| 7 | +DockerHub](https://hub.docker.com/_/postgres). |
| 8 | + |
| 9 | +The folder includes: |
| 10 | + |
| 11 | +- Directories for each supported PostgreSQL version. |
| 12 | +- [Image catalog |
| 13 | + files](https://cloudnative-pg.io/documentation/current/image_catalog/) for |
| 14 | +each Debian version. |
| 15 | +- Templates for the main `Dockerfile` and the beta version `Dockerfile` |
| 16 | + (typically identical, except for some extensions that are not ready for the |
| 17 | + new major release of PostgreSQL). |
| 18 | +- The `requirements.in` file required to build Barman Cloud images. (Note: This |
| 19 | + file will be removed once a Barman Cloud plugin supporting CNPG-I is |
| 20 | + distributed.) |
| 21 | +- The main update script. |
| 22 | + |
| 23 | +## Adding a New Beta Version |
| 24 | + |
| 25 | +To add a new beta version, follow these steps: |
| 26 | + |
| 27 | +1. Create a new issue in the ["postgres-containers" project](https://github.com/cloudnative-pg/postgres-containers) |
| 28 | + with the title "Add PostgreSQL XX beta1 images". |
| 29 | +2. Clone the `postgres-containers` repository. |
| 30 | +3. Create a new branch named after the issue ID (e.g., `dev/YYY`). |
| 31 | +4. Create the `Debian/XX/` directory. |
| 32 | +5. Identify the latest Debian version name (e.g., `bookworm`). |
| 33 | +6. Run `Debian/update.sh XX -d bookworm` which will create a |
| 34 | + `.versions.json` file into the `Debian/XX/bookworm/` directory. |
| 35 | +7. Add the new directory to your commit and push the changes. |
| 36 | +8. Run the `Automatic updates` action on the branch and wait for it to complete |
| 37 | + (this will add a commit to the branch). |
| 38 | +9. Submit a pull request. |
| 39 | + |
| 40 | + |
| 41 | +## Troubleshooting |
| 42 | + |
| 43 | +### Common issues |
| 44 | + |
| 45 | +* Error while running `update.sh` |
| 46 | + |
| 47 | +``` |
| 48 | +sed: can't read requirements.txt: No such file or directory |
| 49 | +cat: requirements.txt: No such file or directory |
| 50 | +rm: cannot remove 'requirements.txt': No such file or directory |
| 51 | +``` |
| 52 | + |
| 53 | +If a similar error appears, the reason is that you are missing the |
| 54 | +`pip-compile` utility that's needed to build the python requirements |
| 55 | +for Barman Cloud. (Note: This requirement will be removed once a |
| 56 | +Barman Cloud plugin supporting CNPG-I is distributed.) |
0 commit comments