You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+57-41Lines changed: 57 additions & 41 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,11 +2,10 @@
2
2
3
3
[](https://github.com/postgis/docker-postgis/actions)[](https://gitter.im/postgis/docker-postgis?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
4
4
5
-
The `postgis/postgis` image provides tags for running Postgres with [PostGIS](http://postgis.net/) extensions installed. This image is based on the official [`postgres`](https://registry.hub.docker.com/_/postgres/) image and provides debian and alpine variants for PostGIS 3.5.x and 3.6.x, which is compatible with PostgreSQL versions 13, 14, 15, 16, 17 and 18. Additionally, image variants are provided for PostgreSQL 16 and 17, built with PostGIS (and its dependencies) from their respective master branches. These are tagged as `16-master` and `17-master`.
5
+
**⚠️ Breaking change (PostgreSQL 18+):**
6
+
Default `VOLUME` path changed to `/var/lib/postgresql`
6
7
7
-
> [!CAUTION]
8
-
> ### Breaking Changes
9
-
> ***PostgreSQL / PostGIS 18+**: the default `VOLUME` path changed to `/var/lib/postgresql`
8
+
The `postgis/postgis` image provides tags for running Postgres with [PostGIS](http://postgis.net/) extensions installed. This image is based on the official [`postgres`](https://registry.hub.docker.com/_/postgres/) image and provides Debian and Alpine variants for PostGIS 3.5.x and 3.6.x that are compatible with PostgreSQL versions 13, 14, 15, 16, 17 and 18. Additionally, image variants are provided for PostgreSQL 16 and 17, built with PostGIS (and its dependencies) from their respective master branches. These are tagged as `16-master` and `17-master`.
10
9
11
10
This image ensures that the default database created by the parent `postgres` image will have the following extensions installed:
12
11
@@ -15,32 +14,35 @@ This image ensures that the default database created by the parent `postgres` im
15
14
|`postgis`| yes |
16
15
|`postgis_topology`| yes |
17
16
|`postgis_tiger_geocoder`| yes |
18
-
|`postgis_raster`||
19
-
|`postgis_sfcgal`||
20
-
|`address_standardizer`||
21
-
|`address_standardizer_data_us`||
17
+
|`postgis_raster`|no (available) |
18
+
|`postgis_sfcgal`|no (available) |
19
+
|`address_standardizer`|no (available) |
20
+
|`address_standardizer_data_us`|no (available) |
22
21
23
22
Unless `-e POSTGRES_DB` is passed to the container at startup time, this database will be named after the admin user (either `postgres` or the user specified with `-e POSTGRES_USER`). If you would prefer to use the older template database mechanism for enabling PostGIS, the image also provides a PostGIS-enabled template database called `template_postgis`.
24
23
25
-
## Versions (2025-10-08)
24
+
## Versions (2025-10-09)
26
25
27
-
Supported architecture: `amd64` (also known as X86-64)"
26
+
Supported architecture: `amd64` (x86-64)
28
27
29
28
Recommended versions for new users are:
30
29
31
-
*`postgis/postgis:18-3.6` - ⚠️ **VOLUME path changed to `/var/lib/postgresql` in PostgreSQL 18+**
30
+
*`postgis/postgis:18-3.6`
31
+
* ⚠️ Uses `VOLUME` path `/var/lib/postgresql` (changed in PostgreSQL 18+)
> Please adjust your volume mounts accordingly when upgrading to `postgis/postgis:18-*` or newer.
152
-
>
153
-
> For more details, see [this upstream change](https://github.com/docker-library/postgres/pull/1259).
154
-
142
+
*`PGDATA`[⚠️ Changed in Docker PostgreSQL >=18 ! ⚠️ ](https://github.com/docker-library/docs/blob/master/postgres/README.md#pgdata)
155
143
156
144
Read more in the [docker-postgres README page](https://github.com/docker-library/docs/blob/master/postgres/README.md)
157
145
158
-
Warning: **the Docker specific variables will only have an effect if you start the container with a data directory that is empty;** any pre-existing database will be left untouched on container startup.
159
146
160
-
It's important to note that the environment variables for the Docker image are different from those of the [libpq — C Library](https://www.postgresql.org/docs/current/libpq-envars.html) (`PGDATABASE`,`PGUSER`,`PGPASSWORD` )
147
+
### ⚠️ `PGDATA` Volume Path Change
148
+
149
+
Starting from **PostgreSQL 18**, the default data directory (`VOLUME`) path has changed.
150
+
This affects all corresponding **`postgis/postgis:18-*`** and newer images.
And if you don't have a postgres docker experience - read this blog post:
178
192
@@ -184,9 +198,10 @@ It's crucial to be aware that in a cloud environment, with default settings, the
184
198
185
199
* Note that ports which are not bound to the host (i.e., `-p 5432:5432` instead of `-p 127.0.0.1:5432:5432`) will be accessible from the outside. This also applies if you configured UFW to block this specific port, as Docker manages its own iptables rules. ( [Read More](https://docs.docker.com/network/iptables/) )
186
200
187
-
#### io_uring
188
-
Every `postgis/postgis:18*` image includes **`io_uring` capabilities** for asynchronous I/O. However, some container runtimes (for example, [containerd](https://github.com/containerd/containerd/issues/9048)) have **disabled `io_uring` support** in the past due to **security concerns**.
189
-
If you wish to experiment with this feature, please do so **at your own risk**, and only **after explicitly enabling `io_uring` in your [seccomp profile](https://docs.docker.com/engine/security/seccomp/)**.
201
+
### io_uring
202
+
203
+
Every `postgis/postgis:18-*` image includes `io_uring` capabilities for asynchronous I/O. However, some container runtimes (for example, [containerd](https://github.com/containerd/containerd/issues/9048)) have **disabled `io_uring` support** in the past due to **security concerns**.
204
+
If you wish to experiment with this feature, please do so **at your own risk**, and only after explicitly enabling `io_uring` in your [seccomp profile](https://docs.docker.com/engine/security/seccomp/).
190
205
191
206
### Recommendations
192
207
@@ -196,9 +211,9 @@ If you wish to experiment with this feature, please do so **at your own risk**,
196
211
197
212
### Security scanner information
198
213
199
-
* Please also scan the base `postgres`docker Image:
200
-
It's important to also scan the base `postgres` Docker image for potential security issues. If your security scanner reports vulnerabilities (known as CVEs) in the image, you may wonder why. To get a better understanding, please read the Docker Library FAQ, especially the section titled ["Why does my security scanner show that an image has CVEs?"](https://github.com/docker-library/faq#why-does-my-security-scanner-show-that-an-image-has-cves)
201
-
For more specific issues related to the postgres docker image, you can search using these links:
214
+
* Please also scan the base `postgres`Docker image for potential security issues.
215
+
If your security scanner reports vulnerabilities (CVEs), check the [Docker Library FAQ](https://github.com/docker-library/faq#why-does-my-security-scanner-show-that-an-image-has-cves) — especially the section *“Why does my security scanner show that an image has CVEs?”*
216
+
For more specific issues related to the Postgres Docker image, you can search using these links:
202
217
*[search for repo:docker-library/postgres trivy](https://github.com/search?q=repo%3Adocker-library%2Fpostgres+trivy&type=issues)
203
218
*[search for repo:docker-library/postgres CVE](https://github.com/search?q=repo%3Adocker-library%2Fpostgres+CVE&type=issues)
204
219
@@ -221,11 +236,11 @@ We are always open to suggestions to enhance security. If you have any ideas, pl
221
236
222
237
## Known Issues / Errors
223
238
224
-
When You encounter errors due to PostGIS update `OperationalError: could not access file "$libdir/postgis-X.X`, run:
239
+
When you encounter errors due to PostGIS update `OperationalError: could not access file "$libdir/postgis-X.X`, run:
225
240
226
241
`docker exec some-postgis update-postgis.sh`
227
242
228
-
It will update to Your newest PostGIS. Update is idempotent, so it won't hurt when You run it more than once, You will get notification like:
243
+
It will update to your newest PostGIS. Update is idempotent, so it won't hurt when you run it more than once. You will get a notification like:
229
244
230
245
```log
231
246
Updating PostGIS extensions template_postgis to X.X.X
@@ -247,6 +262,7 @@ This Docker-PostGIS project [is part of the PostGIS group](https://postgis.net/d
247
262
* Please take a moment to review the current issues, discussions, and pull requests before you start.
248
263
* If you have a major change in mind, we kindly ask you to start a discussion about it first.
249
264
* After making changes to the templates, please run the `./update.sh` script.
265
+
* The `README.md` must be written in plain and platform-compatible Markdown that renders correctly on both GitHub and [Docker Hub](https://hub.docker.com/r/postgis/postgis).
0 commit comments