The following convention is used for tagging the images:
kartoza/postgis:[POSTGRES_MAJOR_VERSION]-[POSTGIS_MAJOR_VERSION].[POSTGIS_MINOR_RELEASE]
So for example:
kartoza/postgis:18-3.6 Provides PostgreSQL 18.0, PostGIS 3.6
To build the image yourself do:
docker build -t kartoza/postgis git://github.com/kartoza/docker-postgisAlternatively clone the repository and build against any preferred branch
git clone git://github.com/kartoza/docker-postgis
git checkout branch_nameThen do:
docker build -t kartoza/postgis .Or build against a specific PostgreSQL version
docker build --build-arg POSTGRES_MAJOR_VERSION=13 --build-arg POSTGIS_MAJOR=3 -t kartoza/postgis:POSTGRES_MAJOR_VERSION .There are build args for DISTRO (=debian), IMAGE_VERSION (=buster) and IMAGE_VARIANT (=slim)
which can be used to control the base image used (but it still needs to be Debian based and have
PostgreSQL official apt repo).
For example making Ubuntu 20.04 based build (for better arm64 support) Edit the .env file to
change the build arguments,
DISTRO=ubuntu
IMAGE_VERSION=focal
IMAGE_VARIANT="" Then run the script
./build.shBy default, the image build will include all locales to cover any value for locale settings
such as
DEFAULT_COLLATIONDEFAULT_CTYPEDEFAULT_ENCODING
You can use the build argument: GENERATE_ALL_LOCALE=0
This will build with the default locate and speed up the build considerably.