I am trying to use a postgis plugin that will only run on postgis version 3.1/3.2. After trying to deprecate the version on my local computer (and failing), I am now trying to run postgis 3.1 on a container instead. However, only the latest version (3.3) is appearing to be installed.
I am using the kartoza postgis docker container setup. This allows you to defer to a previous version of postgres/postgis either by changing to a different branch in the git repo, or by using the following command:
docker build --build-arg POSTGRES_MAJOR_VERSION=13 --build-arg POSTGIS_MAJOR_VERSION=3 --build-arg POSTGIS_MINOR_VERSION=1 -t kartoza/postgis:POSTGRES_MAJOR_VERSION .
I have tried both methods, built and rebuilt the image, but when I run the container it still gives the latest version of postgis (3.3). No idea how to solve this. My colleagues have managed to get the plugin working so I know it can be done!