|
1 |
| -PostgreSQL container images |
2 |
| -======================== |
| 1 | +# PostgreSQL Container Images |
3 | 2 |
|
4 | 3 | [](https://github.com/sclorg/postgresql-container/actions/workflows/build-and-push.yml)
|
5 | 4 |
|
6 |
| -Images available on Quay are: |
7 |
| -* CentOS 7 [postgresql-10](https://quay.io/repository/centos7/postgresql-10-centos7) |
8 |
| -* CentOS 7 [postgresql-12](https://quay.io/repository/centos7/postgresql-12-centos7) |
9 |
| -* CentOS 7 [postgresql-13](https://quay.io/repository/centos7/postgresql-13-centos7) |
10 |
| -* CentOS Stream 8 [postgresql-10](https://quay.io/repository/sclorg/postgresql-10-c8s) |
11 |
| -* CentOS Stream 8 [postgresql-13](https://quay.io/repository/sclorg/postgresql-13-c8s) |
12 |
| -* CentOS Stream 8 [postgresql-15](https://quay.io/repository/sclorg/postgresql-15-c8s) |
13 |
| -* CentOS Stream 9 [postgresql-13](https://quay.io/repository/sclorg/postgresql-13-c9s) |
14 |
| -* CentOS Stream 9 [postgresql-15](https://quay.io/repository/sclorg/postgresql-15-c9s) |
15 |
| -* Fedora [postgresql-11](https://quay.io/repository/fedora/postgresql-11) |
16 |
| -* Fedora [postgresql-12](https://quay.io/repository/fedora/postgresql-12) |
17 |
| -* Fedora [postgresql-13](https://quay.io/repository/fedora/postgresql-13) |
18 |
| -* Fedora [postgresql-14](https://quay.io/repository/fedora/postgresql-14) |
19 |
| -* Fedora [postgresql-15](https://quay.io/repository/fedora/postgresql-15) |
20 |
| - |
21 |
| -This repository contains Dockerfiles for PostgreSQL images for OpenShift. |
22 |
| -Users can choose between RHEL, Fedora and CentOS based images. |
23 |
| - |
24 |
| -For more information about using these images with OpenShift, please see the |
25 |
| -official [OpenShift Documentation](https://docs.okd.io/latest/openshift_images/using-templates.html). |
26 |
| - |
27 |
| -For more information about contributing, see |
28 |
| -[the Contribution Guidelines](https://github.com/sclorg/welcome/blob/master/contribution.md). |
29 |
| -For more information about concepts used in these container images, see the |
30 |
| -[Landing page](https://github.com/sclorg/welcome). |
31 |
| - |
32 |
| - |
33 |
| -Versions |
34 |
| ---------------- |
| 5 | +Images available on Quay.io are: |
| 6 | + |
| 7 | +- CentOS 7 [postgresql-10](https://quay.io/repository/centos7/postgresql-10-centos7) |
| 8 | +- CentOS 7 [postgresql-12](https://quay.io/repository/centos7/postgresql-12-centos7) |
| 9 | +- CentOS 7 [postgresql-13](https://quay.io/repository/centos7/postgresql-13-centos7) |
| 10 | +- CentOS Stream 8 [postgresql-10](https://quay.io/repository/sclorg/postgresql-10-c8s) |
| 11 | +- CentOS Stream 8 [postgresql-13](https://quay.io/repository/sclorg/postgresql-13-c8s) |
| 12 | +- CentOS Stream 8 [postgresql-15](https://quay.io/repository/sclorg/postgresql-15-c8s) |
| 13 | +- CentOS Stream 9 [postgresql-13](https://quay.io/repository/sclorg/postgresql-13-c9s) |
| 14 | +- CentOS Stream 9 [postgresql-15](https://quay.io/repository/sclorg/postgresql-15-c9s) |
| 15 | +- Fedora [postgresql-11](https://quay.io/repository/fedora/postgresql-11) |
| 16 | +- Fedora [postgresql-12](https://quay.io/repository/fedora/postgresql-12) |
| 17 | +- Fedora [postgresql-13](https://quay.io/repository/fedora/postgresql-13) |
| 18 | +- Fedora [postgresql-14](https://quay.io/repository/fedora/postgresql-14) |
| 19 | +- Fedora [postgresql-15](https://quay.io/repository/fedora/postgresql-15) |
| 20 | + |
| 21 | +This repository provides Dockerfiles for PostgreSQL container images, optimized for use with OpenShift. These images are available in RHEL, Fedora, and CentOS-based variants. |
| 22 | + |
| 23 | +For more information about using these images with OpenShift, please refer to the official [OpenShift Documentation](https://docs.okd.io/latest/openshift_images/using-templates.html). |
| 24 | + |
| 25 | +To contribute to this project, please review [the Contribution Guidelines](https://github.com/sclorg/welcome/blob/master/contribution.md). |
| 26 | +For learning more information about concepts used in these container images, see the [Landing page](https://github.com/sclorg/welcome). |
| 27 | + |
| 28 | +## Versions |
| 29 | + |
35 | 30 | PostgreSQL versions currently supported are:
|
36 |
| -* [postgresql-10](https://github.com/sclorg/postgresql-container/tree/master/10) |
37 |
| -* [postgresql-12](https://github.com/sclorg/postgresql-container/tree/master/12) |
38 |
| -* [postgresql-13](https://github.com/sclorg/postgresql-container/tree/master/13) |
39 |
| -* [postgresql-14](https://github.com/sclorg/postgresql-container/tree/master/14) |
40 |
| -* [postgresql-15](https://github.com/sclorg/postgresql-container/tree/master/15) |
| 31 | + |
| 32 | +- [postgresql-10](https://github.com/sclorg/postgresql-container/tree/master/10) |
| 33 | +- [postgresql-12](https://github.com/sclorg/postgresql-container/tree/master/12) |
| 34 | +- [postgresql-13](https://github.com/sclorg/postgresql-container/tree/master/13) |
| 35 | +- [postgresql-14](https://github.com/sclorg/postgresql-container/tree/master/14) |
| 36 | +- [postgresql-15](https://github.com/sclorg/postgresql-container/tree/master/15) |
41 | 37 |
|
42 | 38 | RHEL versions currently supported are:
|
43 |
| -* RHEL7 |
44 |
| -* RHEL8 |
45 |
| -* RHEL9 |
| 39 | + |
| 40 | +- RHEL7 |
| 41 | +- RHEL8 |
| 42 | +- RHEL9 |
46 | 43 |
|
47 | 44 | CentOS versions currently supported are:
|
48 |
| -* CentOS7 |
49 |
| -* CentOS Stream 8 |
50 |
| -* CentOS Stream 9 |
51 | 45 |
|
| 46 | +- CentOS7 |
| 47 | +- CentOS Stream 8 |
| 48 | +- CentOS Stream 9 |
| 49 | + |
| 50 | +## Installation |
| 51 | + |
| 52 | +Choose either the CentOS Stream 9 or RHEL9-based image: |
| 53 | + |
| 54 | +- **RHEL9 based image** |
| 55 | + |
| 56 | + These images are available in the [Red Hat Container Catalog](https://access.redhat.com/containers/#/registry.access.redhat.com/rhel9/postgresql-13). |
| 57 | + To download the image, execute the following command: |
52 | 58 |
|
53 |
| -Installation |
54 |
| ----------------------- |
55 |
| -Choose either the CentOS Stream 9 or RHEL9 based image: |
| 59 | + ```bash |
| 60 | + podman pull registry.redhat.io/rhel9/postgresql-13 |
| 61 | + ``` |
56 | 62 |
|
57 |
| -* **RHEL9 based image** |
| 63 | + To build a RHEL9-based image, ensure you run Docker build on a RHEL machine with a valid subscription. |
58 | 64 |
|
59 |
| - These images are available in the [Red Hat Container Catalog](https://access.redhat.com/containers/#/registry.access.redhat.com/rhel9/postgresql-13). |
60 |
| - To download it run: |
61 |
| - ``` |
62 |
| - podman pull registry.redhat.io/rhel9/postgresql-13 |
63 |
| - ``` |
| 65 | + ```bash |
| 66 | + $ git clone --recursive https://github.com/sclorg/postgresql-container.git |
| 67 | + $ cd postgresql |
| 68 | + $ make build TARGET=rhel9 VERSIONS=13 |
| 69 | + ``` |
64 | 70 |
|
65 |
| - To build a RHEL9 based image, you need to run Docker build on a properly |
66 |
| - subscribed RHEL machine. |
| 71 | +- **CentOS Stream 9 based image** |
67 | 72 |
|
68 |
| - ``` |
69 |
| - $ git clone --recursive https://github.com/sclorg/postgresql-container.git |
70 |
| - $ cd postgresql |
71 |
| - $ make build TARGET=rhel9 VERSIONS=13 |
72 |
| - ``` |
| 73 | + These images are available on Quay.io. To download the image, execute the following command: |
73 | 74 |
|
74 |
| -* **CentOS Stream 9 based image** |
| 75 | + ```bash |
| 76 | + $ podman pull https://quay.io/repository/sclorg/postgresql-13-c9s |
| 77 | + ``` |
75 | 78 |
|
76 |
| - These images are available on Quay.io. To download it run: |
| 79 | + To build a PostgreSQL image from scratch, perform the following steps: |
77 | 80 |
|
78 |
| - ``` |
79 |
| - $ podman pull https://quay.io/repository/sclorg/postgresql-13-c9s |
80 |
| - ``` |
| 81 | + ```bash |
| 82 | + $ git clone --recursive https://github.com/sclorg/postgresql-container.git |
| 83 | + $ cd postgresql |
| 84 | + $ make build TARGET=c9s VERSIONS=13 |
| 85 | + ``` |
81 | 86 |
|
82 |
| - To build a PostgreSQL image from scratch run: |
| 87 | +Note: While the installation steps utilize `podman`, you can substitute these calls with `docker` with the same arguments. |
83 | 88 |
|
84 |
| - ``` |
85 |
| - $ git clone --recursive https://github.com/sclorg/postgresql-container.git |
86 |
| - $ cd postgresql |
87 |
| - $ make build TARGET=c9s VERSIONS=13 |
88 |
| - ``` |
| 89 | +**Warning: By omitting the `VERSIONS` parameter, the build/test action will be executed on all provided versions of PostgreSQL.** |
89 | 90 |
|
90 |
| -Note: while the installation steps are calling `podman`, you can replace any such calls by `docker` with the same arguments. |
| 91 | +## Contributing Guidelines |
91 | 92 |
|
92 |
| -**Notice: By omitting the `VERSIONS` parameter, the build/test action will be performed |
93 |
| -on all provided versions of PostgreSQL.** |
| 93 | +This repository utilizes [distgen](https://github.com/devexp-db/distgen/) for generating image source files. If you are interested in updating a Dockerfile, please modify the relevant sections in the `specs/multispec.yml` file and/or the `Dockerfile.template` (or other distgen files), and then execute `make generate`. |
94 | 94 |
|
95 |
| -Contributing |
96 |
| --------------------------------- |
| 95 | +Before you begin, ensure that you have `distgen` installed by running `dg --version`. If `distgen` is not installed on your system, follow the installation guide available at [distgen's GitHub repository](https://github.com/devexp-db/distgen/). |
| 96 | +Additionally, for testing purposes, install `go-md2man` from this repository [go-md2man](https://github.com/cpuguy83/go-md2man) or via `dnf install go-md2man`. |
97 | 97 |
|
98 |
| -In this repository [distgen](https://github.com/devexp-db/distgen/) is used for generating image source files. If you'd like update a Dockerfile, please make changes in specs/multispec.yml and/or Dockerfile.template (or other distgen file) and run `make generate`. |
| 98 | +To contribute, please follow these steps: |
99 | 99 |
|
100 |
| -Usage |
101 |
| ---------------------------------- |
| 100 | +1. Fork the repository |
| 101 | +2. Run `git submodule update --init` to download the `common` submodule containing the `common/common.mk` makefile. |
| 102 | +3. Implement a new feature or bug fix in the templates (found in the `src` directory) or update values in the `specs/multispec.yml` file. |
| 103 | + - Note: If no changes are made to these directories, file regeneration is not necessary. |
| 104 | +4. Regenerate all files by executing `make generate`. |
| 105 | +5. Consider running CI tests, as described in the Test section below. |
| 106 | +6. Commit the files and generated files in two separated commits with a conventional commit message for each. |
| 107 | +7. Open a pull request for review! |
102 | 108 |
|
103 |
| -For information about usage of Dockerfile for PostgreSQL 10, |
104 |
| -see [usage documentation](https://github.com/sclorg/postgresql-container/tree/master/10). |
| 109 | +## Usage |
105 | 110 |
|
106 |
| -For information about usage of Dockerfile for PostgreSQL 12, |
107 |
| -see [usage documentation](https://github.com/sclorg/postgresql-container/tree/master/12). |
| 111 | +For detailed information on the usage of specific PostgreSQL Dockerfiles, please refer to the corresponding usage documentation: |
108 | 112 |
|
109 |
| -For information about usage of Dockerfile for PostgreSQL 13, |
110 |
| -see [usage documentation](https://github.com/sclorg/postgresql-container/tree/master/13). |
| 113 | +- [PostgreSQL 10 Usage Documentation](https://github.com/sclorg/postgresql-container/tree/master/10) |
| 114 | +- [PostgreSQL 12 Usage Documentation](https://github.com/sclorg/postgresql-container/tree/master/12) |
| 115 | +- [PostgreSQL 13 Usage Documentation](https://github.com/sclorg/postgresql-container/tree/master/13) |
| 116 | +- [PostgreSQL 14 Usage Documentation](https://github.com/sclorg/postgresql-container/tree/master/14) |
| 117 | +- [PostgreSQL 15 Usage Documentation](https://github.com/sclorg/postgresql-container/tree/master/15) |
111 | 118 |
|
112 |
| -For information about usage of Dockerfile for PostgreSQL 14, |
113 |
| -see [usage documentation](https://github.com/sclorg/postgresql-container/tree/master/14). |
| 119 | +For unsupported versions, you may refer to: |
114 | 120 |
|
115 |
| -For information about usage of Dockerfile for PostgreSQL 15, |
116 |
| -see [usage documentation](https://github.com/sclorg/postgresql-container/tree/master/15). |
| 121 | +- [PostgreSQL 9.2](https://github.com/sclorg/postgresql-container/blob/f213e5d0/9.2) |
| 122 | +- [PostgreSQL 9.4](https://github.com/sclorg/postgresql-container/blob/2ab68e86/9.4) |
117 | 123 |
|
118 |
| -For versions which are not supported anymore: |
| 124 | +## Test |
119 | 125 |
|
120 |
| -* [PostgreSQL 9.2](https://github.com/sclorg/postgresql-container/blob/f213e5d0/9.2) |
121 |
| -* [PostgreSQL 9.4](https://github.com/sclorg/postgresql-container/blob/2ab68e86/9.4) |
| 126 | +This repository includes a testing framework that verifies the basic functionality of the PostgreSQL image. Users can choose to test the image based on RHEL or CentOS Stream. |
122 | 127 |
|
123 |
| -Test |
124 |
| ---------------------------------- |
| 128 | +- **RHEL-based image** |
125 | 129 |
|
126 |
| -This repository also provides a test framework, which checks basic functionality |
127 |
| -of the PostgreSQL image. |
| 130 | + To test a RHEL9-based PostgreSQL image, ensure you are running the test on a properly subscribed RHEL machine. |
128 | 131 |
|
129 |
| -Users can choose between testing PostgreSQL based on a RHEL or CentOS Stream image. |
| 132 | + ```bash |
| 133 | + $ cd postgresql |
| 134 | + $ make test TARGET=rhel9 VERSIONS=13 |
| 135 | + ``` |
130 | 136 |
|
131 |
| -* **RHEL based image** |
| 137 | +- **CentOS Stream-based image** |
132 | 138 |
|
133 |
| - To test a RHEL9 based PostgreSQL image, you need to run the test on a properly |
134 |
| - subscribed RHEL machine. |
| 139 | + ```bash |
| 140 | + $ cd postgresql |
| 141 | + $ make test TARGET=c9s VERSIONS=13 |
| 142 | + ``` |
135 | 143 |
|
136 |
| - ``` |
137 |
| - $ cd postgresql |
138 |
| - $ make test TARGET=rhel9 VERSIONS=13 |
139 |
| - ``` |
| 144 | +- To run a specific subset of test cases, use the `TESTS` parameter: |
140 | 145 |
|
141 |
| -* **CentOS Stream based image** |
| 146 | + ```bash |
| 147 | + $ cd postgresql |
| 148 | + $ make test VERSIONS=13 TESTS="run_general_tests run_replication_test" |
| 149 | + ``` |
142 | 150 |
|
143 |
| - ``` |
144 |
| - $ cd postgresql |
145 |
| - $ make test TARGET=c9s VERSIONS=13 |
146 |
| - ``` |
147 |
| -+By using the `TESTS` parameter you can choose a test case subset to be run against the image, eg: |
| 151 | +**Note: By omitting the `VERSIONS` parameter, the build/test action will be performed on all provided versions of PostgreSQL.** |
148 | 152 |
|
149 |
| - $ cd postgresql |
150 |
| - $ make test VERSIONS=13 TESTS="run_general_tests run_replication_test" |
| 153 | +The test command is utilized from the `common` submodule. While it is possible to run `make test-openshift-4`, it is typically not necessary. All commands for the Makefile can be found in `common/Makefile`. The `make test` command will execute all tests required by the CI. |
151 | 154 |
|
| 155 | +## Enabling SSL/TLS for PostgreSQL container |
152 | 156 |
|
153 |
| -**Notice: By omitting the `VERSIONS` parameter, the build/test action will be performed |
154 |
| -on all provided versions of PostgreSQL.** |
| 157 | +For comprehensive information and instructions on enabling SSL/TLS, please refer to the `examples/enable-ssl/README.md`. |
0 commit comments