Changes between Version 20 and Version 21 of DevWikiDockerTesting


Ignore:
Timestamp:
01/30/23 10:49:15 (22 months ago)
Author:
robe
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DevWikiDockerTesting

    v20 v21  
    1010Here is an example of how you can pull an image, retag and push to postgis-docker.osgeo.org
    1111
    12 
     12**FOR DEVELOPMENT**
    1313{{{
    1414#To develop and test using this image, do the following
     15cd ~/
    1516mkdir projects
    1617
     
    2324  --mount type=bind,source="$(pwd)/projects",target=/projects \
    2425  docker.osgeo.org/postgis/build-test:trisquel3  tail -f /dev/null
     26
    2527
    2628cd projects
     
    6365Docker Hub is used for Github-actions testing and there is also a postgis for production use. The main link to all is [https://hub.docker.com/u/postgis]
    6466
    65 * [https://hub.docker.com/r/postgis/postgis] - has production images managed by a community of PostGIS users. To become a contributor go to [https://github.com/postgis/docker-postgis]
     67* **FOR PRODUCTION** [https://hub.docker.com/r/postgis/postgis] - has production images managed by a community of PostGIS users. To become a contributor go to [https://github.com/postgis/docker-postgis]
    6668
    67 * [https://hub.docker.com/r/postgis/postgis-build-env] - has development images managed by a PostGIS Development team set aside for regression testing.  Do not use these for production use as they don't even have postgis installed on them. You can find the docker files here [https://github.com/postgis/postgis-build-env]
     69* **FOR DEVELOPMENT** [https://hub.docker.com/r/postgis/postgis-build-env] - has development images managed by a PostGIS Development team set aside for regression testing.  Do not use these for production use as they don't even have postgis installed on them. You can find the docker files here [https://github.com/postgis/postgis-build-env]
    6870
     71The 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
     73You 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
     79cd ~/
     80mkdir 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
     85docker pull postgis/postgis-build-env:latest
     86#this might take a minute or so after download to start up
     87docker 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
     92cd projects
     93git clone https://git.osgeo.org/gitea/postgis/postgis.git
     94
     95
     96
     97#once started you can attach to it
     98docker 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
     102cd /projects/postgis
     103# Flags for coverage build
     104CFLAGS_COV="-g -O0 --coverage"
     105LDFLAGS_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
     111make -j 4
     112make check
     113make 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
     120docker stop postgis-dev
     121
     122# if you need to remove the container to get a new version do
     123
     124docker rm postgis-dev
     125
     126}}}
    69127 
    70128