| 71 | The postgis-build-env images don't have PostGIS installed on them at all, but have all the key dependencies needed to compile PostGIS. The version **latest** in development versions proj, gdal, geos, postgresql, and sfcgal. It is used to catch possible issues with other upstream projects. |
| 72 | |
| 73 | You can set it up much the same as the docker.osgeo.org development suite detailed earlier. |
| 74 | |
| 75 | |
| 76 | **FOR DEVELOPMENT** |
| 77 | {{{ |
| 78 | #To develop and test using this image, do the following |
| 79 | cd ~/ |
| 80 | mkdir projects |
| 81 | |
| 82 | #this container has no built in entry point to keep it running, |
| 83 | # create a fake one as discussed here - https://levelup.gitconnected.com/keep-docker-container-running-for-debugging-fc2dfa39472c |
| 84 | |
| 85 | docker pull postgis/postgis-build-env:latest |
| 86 | #this might take a minute or so after download to start up |
| 87 | docker run -d \ |
| 88 | --name postgis-build-env \ |
| 89 | --mount type=bind,source="$(pwd)/projects",target=/projects \ |
| 90 | postgis/postgis-build-env:latest tail -f /dev/null |
| 91 | |
| 92 | cd projects |
| 93 | git clone https://git.osgeo.org/gitea/postgis/postgis.git |
| 94 | |
| 95 | |
| 96 | |
| 97 | #once started you can attach to it |
| 98 | docker exec -it postgis-build-env /bin/bash |
| 99 | |
| 100 | # in the postgis-buildenv container, you should be able to do |
| 101 | # below copied from https://git.osgeo.org/gitea/postgis/postgis/src/branch/master/ci/github/run_coverage.sh |
| 102 | cd /projects/postgis |
| 103 | # Flags for coverage build |
| 104 | CFLAGS_COV="-g -O0 --coverage" |
| 105 | LDFLAGS_COV="--coverage" |
| 106 | |
| 107 | #TODO fix this, container starts up using postgres, and so these fail if mounting an external source folder |
| 108 | /usr/local/pgsql/bin/pg_ctl -c -l /tmp/logfile -o '-F' start |
| 109 | ./autogen.sh |
| 110 | ./configure CFLAGS="${CFLAGS_COV}" LDFLAGS="${LDFLAGS_COV}" --enable-debug |
| 111 | make -j 4 |
| 112 | make check |
| 113 | make install |
| 114 | |
| 115 | #any changes you make to your local folder projects/postgis, will show in the container /projects/postgis |
| 116 | |
| 117 | #in the container |
| 118 | |
| 119 | # To stop it do |
| 120 | docker stop postgis-dev |
| 121 | |
| 122 | # if you need to remove the container to get a new version do |
| 123 | |
| 124 | docker rm postgis-dev |
| 125 | |
| 126 | }}} |