// the find
postgis/docker-postgis
Docker image for PostGIS
The official Docker image for PostGIS, maintained under the PostGIS project umbrella. It layers PostGIS and its geospatial dependencies (GEOS, GDAL, PROJ, SFCGAL) on top of the official postgres image, with both Debian and Alpine variants across PostgreSQL 14–18. If you need a spatially-enabled Postgres, this is the thing to reach for — there is no serious alternative.
The tag matrix is thorough: every supported PG version gets a stable PostGIS release, plus Alpine variants for size-conscious deployments and -master tags for testing against PostGIS HEAD. The weekly Monday rebuild means you're not stuck waiting for a manual push when upstream security patches land. The update-postgis.sh script for handling the '$libdir/postgis-X.X' error after upgrades is a real quality-of-life addition — that failure mode bites everyone eventually. The repo is now under the official PostGIS umbrella, so it tracks upstream closely and the contributor bar is lower than a random community fork.
Only amd64 is supported — no arm64, which is a genuine problem now that Apple Silicon dev machines and Graviton cloud instances are mainstream. The Debian stable images deliberately lag behind: you get GEOS 3.9 and GDAL 3.2 on PG14–17, which are years old; if you need a recent GDAL feature you're forced to either use Alpine (where PostGIS is compiled from source, making extension is painful) or build your own image. The PGDATA volume path change in PG18 is a silent data-loss trap for anyone upgrading from 17 — it's documented, but anyone relying on a hardcoded volume mount in docker-compose will silently end up with an empty database on first run. There is no multi-database init support out of the box; if you need PostGIS in a non-default database you're writing your own initdb script.